|
-
Oct 30th, 2000, 03:58 PM
#1
Thread Starter
Hyperactive Member
Ok Let me Ramble for a secound .
Made a Chat Client , Made a Server , Implimented Colored Text , Special Fonts , Private Messages , Blah ,blah ,blah ... Working on Filetransfers .
Send a string to sever Telling another Client to create a new Sock to recieve a file . Socks created , Set the IP, Set the Port .... Oh yeah thats the Problem The fricken
PORT You can't open 2 socks on the same port . That makes sense . To make a Connection 1 sock has to listen and the other has to Connect . The connecting Sock Finds it's own Localport to use. The Listening port on the other hand has to be Given a port . Now If I try to open a port thats in Use (either by my app or another one ) It generates an Error "Port in use " . Thats Fine What Ever . I Need to know If theres an equal to FreeFile but for sock ports or Do I Have to Loop through all the ports and catch the error until I Find a port that I Can Use ?
BTW I Hate the Winsuck.ocx , but I can't use the API's
Sorry for screamimg like a Kid ,
[]P
Visual Basic 6 SP4 on win98se
QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!
-
Oct 30th, 2000, 10:49 PM
#2
Frenzied Member
You are making things much more complicated than they have to be. In order for you to do what you are suggesting, all clients will also have to be servers. If client A wants to send to client B, B must be listening for a connection request. And A must be listening for a connection request from B. Throw in clients C to Z and you have a real bucket of worms.
Let the server be a server and the clients be clients.
You are writing a chat app, right? When a client connects to the server it can send the 'login info'. The server will return a list of all the other connected participants. It will then broadcast to each connected client that so-and-so has joined the chat. The same will be true for any message sent to the server...it will be broadcast to all connected clients.
-
Oct 31st, 2000, 02:56 AM
#3
Thread Starter
Hyperactive Member
I must not be explaining myself correctly . It already lets the all the clients comunicate through the server . What I'm trying to do next is a transfer files but I don't want to transfer through the server . I think I have it Figured out . Thnks guys []P
Visual Basic 6 SP4 on win98se
QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|