Jump to content
Sign in to follow this  

question about tcp connection

Recommended Posts

hi guys. 

im working on a program that can communicate over a tcp connection. 

for now only client is supposed to listen the other will send data. 

according to that data the first client will then react. 

there will only be one type of data:  different string values. 

my question is whether i need to close the socket after receiving data in order to send new data. 

or if i can just keep the socket open and basically loop tcpsend()  once the tcpconnect() is established since its the same connection. 

so basic structure : 



tcpaccept() ____________________tcpconnect()



until "whatever :D " or tcpaccept = -1




Share this post

Link to post
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
Sign in to follow this  

  • Create New...