Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Socket programming : Accept return 0. Post 302140801 by abc.working on Tuesday 16th of October 2007 05:56:13 AM
Old 10-16-2007
Socket programming : Accept return 0.

I have a server and client code.
My server says accept and my client says a connect.
After accept when i print inet_ntoa(cin.sin_addr) by running the client on same machine i get 127.0.01 but accept returns a zero. Now when i try to do a recv from the client the recv never waits for a send. It jus returns a -1 and exits. Pls help.
 

10 More Discussions You Might Find Interesting

1. Programming

Socket Programming

Dear Reader, Is there any way to check up socket status other than 'netstatus ' Thanks in advance, (1 Reply)
Discussion started by: joseph_shibu
1 Replies

2. Programming

Socket Programming socket

Hello, I actually try to make client-server program. I'm using SCO OpenServer Release 5.0.0 and when I try to compile my code (by TELNET) I've got this error : I'm just using this simple code : and I get the same error if I use : If someone can help me, Thanks (2 Replies)
Discussion started by: soshell
2 Replies

3. IP Networking

socket programming

my system is a stand alone system... i want to try doing socket porgramming..ihave heard that this is usually done during testing... how can i do that....? (6 Replies)
Discussion started by: damn_bkb
6 Replies

4. Programming

Please help! accept function problems in Socket programming

Hi, I have a client-server socket program. It has been working fine for over a year, but recently it started to show strange behavior.:confused: After the server program runs for a while, it will show in the top command saying it is using lots of CPU, MEM. I assume it means the server code is... (1 Reply)
Discussion started by: natxie
1 Replies

5. IP Networking

Port number of socket returned by accept()

Hi, I typed a few tcp/ip client/server examples from a book and it works - sort of - but I noticed something strange. When I run my server I set it to use port 3001 and the client uses the same port to connect to server. They succeed, but the server prints something that doesn't really make much... (0 Replies)
Discussion started by: idelovski
0 Replies

6. UNIX for Advanced & Expert Users

socket programming

can we send udp message to a destination ip address .. without having an ip address configured in our machine using recvfrom ? (2 Replies)
Discussion started by: Gopi Krishna P
2 Replies

7. Programming

Help with socket programming in C

hi guys i got this code trying to make connection between the server and multi clients but when i do ./server i got message server waiting then when i run ./client it says client 1 nosuch file i dont know whats that should i use any argument plz help how to compile and run and whats the expected... (1 Reply)
Discussion started by: kedah160
1 Replies

8. Programming

socket accept() keeps looping

I'm using C/ C++ with gcc on Linux. I've a server socket where accept() is called on the socket inside a while() loop. The problem I am facing is that the first call to accept is blocking (i.e., the program waits for the first connection) but as soon as I fork afterwards (so that the child process... (2 Replies)
Discussion started by: jaywalker
2 Replies

9. Programming

socket programming

how to include socket.h in visual studio 2005.. (2 Replies)
Discussion started by: asd123
2 Replies

10. Shell Programming and Scripting

How to write a shell script to automatically accept return key with out user intervention?

Hi Friends, i am creating a shell script which is accepting file name as input parameter from Java and invoking finacle service. The service will accpet text file,B2k_session id,etc and upload the text file data in finacle database. My shell script looks like this:- #! /bin/ksh... (2 Replies)
Discussion started by: vadlamudy
2 Replies
emp_hub(6)							   Games Manual 							emp_hub(6)

NAME
emp_hub - Empire multiplexer SYNOPSIS
emp_hub [-persistent] [-debug] [-help] [-mirror] host port localport DESCRIPTION
emp_hub allows multiple clients to simultaneously connect to a single Empire country. This allows you to use both a fast and a smart client simultaneously. It also permits multiple corulers to log in at once. Parameters host Hostname of the upstream server. port TCP/IP port number the empire server is running on. localport TCP/IP port number the emp_hub should listen to for incoming client connections. -mirror Copy commands and replies to all clients using new protocols. Currently only the lafe client is aware of these protocols, though most clients will ignore them. -persistent Normally emp_hub exits after the last client disconnects. With this option emp_hub does not exit, and will wait for new clients to connect. emp_hub must be killed by the user using the kill command. -help Brief usage information. -debug Print lots of messages, including everything sent and received by a client. Useful when debugging either emp_hub , a client, or the server. SEE ALSO
emp_server(6), emp_client(6), emp_hub(6), pei(6), eif(6), http://www.empire.net/~harmless/guide.html, http://empire.idlpaper.com/ BUGS
Due to the nature of the empire protocol, only one client may have input focus at one time. If a client pauses at a context sensitive prompt from the server, all other clients will be unable to send data. AUTHOR
This manual page was written by Drake Diedrich <Drake.Diedrich@anu.edu.au> emp_hub(6)
All times are GMT -4. The time now is 08:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy