socket error 98 on RedHat 7.0, server restart tcp socket.

socket error 98 on RedHat 7.0, server restart tcp socket.

Post by y721 » Wed, 04 Apr 2001 21:25:43



Hi,

Here is what happened.

I use tcp for both server and client connection.

If I close server socker first before all clients close their socket, I will
get
"error in bind 98" tcp socket when I connect with same tcp port again.

Is there any way that I avoid this problem?

I am working on peer to peer network game. One of the player machine is set
to server.
I hope I can close server socket first. And all other clients just get tcp
connection close then close their own socket.

Otherwise, the server has to wait all clients to close. I don't want that
server player machine waits for others.

thank you.

steve

 
 
 

socket error 98 on RedHat 7.0, server restart tcp socket.

Post by y721 » Wed, 04 Apr 2001 21:25:57


Hi,

Here is what happened.

I use tcp for both server and client connection.

If I close server socker first before all clients close their socket, I will
get
"error in bind 98" tcp socket when I connect with same tcp port again.

Is there any way that I avoid this problem?

I am working on peer to peer network game. One of the player machine is set
to server.
I hope I can close server socket first. And all other clients just get tcp
connection close then close their own socket.

Otherwise, the server has to wait all clients to close. I don't want that
server player machine waits for others.

thank you.

steve

 
 
 

socket error 98 on RedHat 7.0, server restart tcp socket.

Post by Nate Eldredg » Thu, 05 Apr 2001 03:09:59



> Hi,

> Here is what happened.

> I use tcp for both server and client connection.

> If I close server socker first before all clients close their socket, I will
> get
> "error in bind 98" tcp socket when I connect with same tcp port again.

On my Linux box, error 98 is EADDRINUSE (Address already in use),
which makes sense.  But you probably want to use the strerror function
to get a human readable text for the errno value.

Quote:> Is there any way that I avoid this problem?

man setsockopt and read about SO_REUSEADDR.

Quote:> I am working on peer to peer network game. One of the player machine is set
> to server.
> I hope I can close server socket first. And all other clients just get tcp
> connection close then close their own socket.

> Otherwise, the server has to wait all clients to close. I don't want that
> server player machine waits for others.

--

Nate Eldredge

 
 
 

1. newbie 98 Nt redhat 7.0 Triple BOOT, (C.H Hochsta) error

I installed win 98 (fat16), and NT 4.0 in NTFS file system
and when I install Red Hat 7.0. I custom installed LILO into first sector,
instead of the MBR.

Then I use bootpart to add entry to the ntboot loader.. (bootpart to my
native partition where I installed LILO to)...

The red hat entry is on the nt boot loader menu, but when I boot into linux
, it say that linux can't boot from hard disk, and mention the C.H Hochstra
(sorry if I spell it wrong) thing...

then it ask for system (floppy) disk which I can boot into linux ..

Does anyone know what's going wrong ? How do I fix it.. is it because I
bootpart into the wrong partition...

thanks very very much..

2. Forking an X-Window process

3. UNIX domain sockets vs TCP sockets

4. Virusscanning using procmail as mda

5. x.25 socket and tcp/ip socket

6. Web browser for Linux on SPARC???

7. Trident web site?

8. idle tcp sockets and dead sockets

9. x.25 socket and tcp/ip socket

10. TCP socket to UDP socket?

11. Sockets sockets and more sockets

12. Socket, Socket, whose got the socket?