win32net help

S

Shin

Hi all, I'm new to the python language and I'm having trouble. I'm
writing a basic chat script...real basic. It's client-server based and
I'm wanting the roles to change -- client becomes server and vice versa.
The problem is when I do this, the server switches to the client no
problem. However, when the client tries to switch to server mode, it
can't because the previous server is still bound to the socket it wants
to use. I've tried using socket.closesocket and socket.DisconnectEx but
nothing works. Any suggestions? Or could you point me to documentation
showing supported commands for win32net? Any help is greatly appreciated.

-Shin
 
S

sp1d3rx

Have you tried using UDP instead of TCP? Also, it is common practice to
choose a random port over 1024 for opening a connection to a remote
server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top