Jump to content

Recommended Posts

i know, i know... sorry for yet another TCP help thread...

It would be nice if someone could make an absolute guide (possibly simply linking to other useful posts and UDFs) that was stickied, as i can never find what i want in search (TCP related)...

Anyway, my question is how to make a simple tcp p2p... the minimal code required to send data between two things, but make it able to keep sending (say something that uses input prompts and message boxes)... i have started a basic server client thing, but a little pointer in teh rigth direction (sudo-code even) to make sure i'm not going down teh wrong route would be much appreciated...

thanks, and sorry again for the new thread...

ps, since i never received a reply from the admin, i cannot log into my previous account... at first i thought i'd forgotten my password, but when i changed it with the password reset thing, i still could not log in... anyone know anything about that...?

Edited by rabbitkillrun2
Link to comment
Share on other sites

i know, i know... sorry for yet another TCP help thread...

It would be nice if someone could make an absolute guide (possibly simply linking to other useful posts and UDFs) that was stickied, as i can never find what i want in search (TCP related)...

Anyway, my question is how to make a simple tcp p2p... the minimal code required to send data between two things, but make it able to keep sending (say something that uses input prompts and message boxes)... i have started a basic server client thing, but a little pointer in teh rigth direction (sudo-code even) to make sure i'm not going down teh wrong route would be much appreciated...

thanks, and sorry again for the new thread...

ps, sicne i never received a reply from the admin, i cannot log into my previous account... at first i thought i'd forgotten my password, but when i changed it with the password reset thing, i still could not log in... anyone know anything about that...?

A good start is Kip's UDF. If you think that you cannot write a program that could work you should be interesed first by other things. You have 1 post and you need TCP p2p. :D:D

When the words fail... music speaks.

Link to comment
Share on other sites

Anyway, my question is how to make a simple tcp p2p... the minimal code required to send data between two things, but make it able to keep sending (say something that uses input prompts and message boxes)

You use the help file. (Link).

Also, you use English not TXT.

Edited by JamesBrooks
Link to comment
Share on other sites

haha, as i said, i cannot log into my main account "rabbitkillrun"... i'm not a total newb... lol

thanks, i'll take a look...

i've already used the help file to do what i've got so far, but i keep getting confused as to what each tcp thing does exactly, and what it returns... thanks anyway...

Edited by rabbitkillrun2
Link to comment
Share on other sites

i've already used the help file to do what i've got so far, but i keep getting confused as to what each tcp thing does exactly, and what it returns... thanks anyway...

The help file blatantly says:

Return Value

Success: Returns number of bytes sent to the connected socket.

Failure: Returns 0 and set @error according to Windows API WSAGetError return.

Read.
Link to comment
Share on other sites

i know what they do, but when i'm using them i get muddled up as i haven't seen a clearcut example as to how to use them...! I forget where to put what return value as which parameter, et cetera... that then requires me to go back to the helpfile, find out, then go back to being confused again... as i said int he first post, even sudo code would have helped, as it was mainly the method that i'm not entirely sure about...

Link to comment
Share on other sites

i know what they do, but when i'm using them i get muddled up as i haven't seen a clearcut example as to how to use them...! I forget where to put what return value as which parameter, et cetera... that then requires me to go back to the helpfile, find out, then go back to being confused again... as i said int he first post, even sudo code would have helped, as it was mainly the method that i'm not entirely sure about...

You can't just jump into something big like TCP. I suggest you go back to basics first. Learn how AutoIt handles return values and parameters.
Link to comment
Share on other sites

In General...

Server:

Open a MAIN socket (a channel) of communication (prescribed by IP and Port)

Listen on that socket

Client:

Connect to a socket (prescribed by IP and Port)

Server:

Accept connection (another socket is created here for client < > server communication)

Server/Client:

Send and Recv on that "socket" using some method of data acknowledgment (send back and forth "yes I recv'd your data" type messages)

Server:

Keep listening on the MAIN socket... others may be trying to connect

Close sockets that disconnect or "sign off"

Maintain an array of connected sockets to cycle through so as to keep communicating with everyone that has connected.

Now... there are a million derivatives of what to do above...

Lar.

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Link to comment
Share on other sites

  • 2 weeks later...

You can't just jump into something big like TCP. I suggest you go back to basics first. Learn how AutoIt handles return values and parameters.

i'm not a complete autoit noob... i HAVE been using it for a long time...

http://techblog.f-snet.com/

curerntly down, but on there somewhere is my most recent project...

In General...

Server:

Open a MAIN socket (a channel) of communication (prescribed by IP and Port)

Listen on that socket

Client:

Connect to a socket (prescribed by IP and Port)

Server:

Accept connection (another socket is created here for client < > server communication)

Server/Client:

Send and Recv on that "socket" using some method of data acknowledgment (send back and forth "yes I recv'd your data" type messages)

Server:

Keep listening on the MAIN socket... others may be trying to connect

Close sockets that disconnect or "sign off"

Maintain an array of connected sockets to cycle through so as to keep communicating with everyone that has connected.

Now... there are a million derivatives of what to do above...

Lar.

Thank you... That is very useful...

I assume that i'd use the TCPListen command in the main program loop?

How do i know that they have disconnected? Would that also be something in the main loop?

Similar to above i guess...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...