From: irq AT bc1 DOT com (interrupt reQuest) Subject: Re: UNIX-Style sockets with gnu-win32 18 Mar 1997 23:01:07 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <332E4FF1.5EF4.cygnus.gnu-win32@bc1.com> References: <332E4F62 DOT 1D36 AT bc1 DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.0b2 (Win95; I) Original-To: gnu-win32 AT cygnus DOT com X-Priority: 3 (Normal) Original-Sender: owner-gnu-win32 AT cygnus DOT com Ron G. Minnich wrote: what's the specific problem? i've not had much trouble other than the select-on-console-and-sockets problem. ron Ron Minnich |"I would point them out but ... rminnich AT sarnoff DOT com | I have no hands." -- Coconut Monkey (609)-734-3120 | (see CM at www.pcgamer.com/coconut.html) ftp://ftp.sarnoff.com/pub/mnfs/www/docs/cluster.html Well, what I have done is used a test server i wrote in unix with gcc... it works fine in unix, the socket binds, listens and accepts connections... i have compiled it with gnuwin32, and proceeded the accept, bind etc... with cygwin32_... it compiles, but the socket will not accept and it is not bound.. here is an attatchment of the code i used... if you have any simple working code as an example, id appreciate it, as i need all the help i can get :P --------------------------------------------------------------- #include #include #include #include #include main() { int server_sockfd, client_sockfd; int server_len, client_len; struct sockaddr_in server_address; struct sockaddr_in client_address; server_sockfd = cygwin32_socket(AF_INET, SOCK_STREAM, 0); server_address.sin_family = AF_INET; server_address.sin_addr.s_addr = cygwin32_inet_addr("207.34.139.51"); server_address.sin_port = 1234; server_len = sizeof(server_address); cygwin32_bind(server_sockfd, (struct sockaddr *)&server_address, server_len); cygwin32_listen(server_sockfd, 5); printf("Server waiting\n"); while(1) { char ch; client_sockfd = cygwin32_accept(server_sockfd, (struct sockaddr *)&client_address, &client_len); read(client_sockfd, &ch, 1); ch++; write(client_sockfd, &ch, 1); close(client_sockfd); } } - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".