:confused:
Printable View
:confused:
:confused:
:confused:
:confused:
if u want to connect a server and a client u must follow this
//Client
Client_Sock.create();
Client_Sock.Connect(server_adr,nport);
send(Client_Sock,buffer,strlen(buffer),0);
//Server
Server_Sock.Create(nport);//the same port
Server_Sock.Listen();
Server_Sock.Accept(tmpSock);
recv(tmpSock,buffer,strlen(buffer),0);
hope that will help
wat does the last second line do?Quote:
Originally posted by Black_Daimond
if u want to connect a server and a client u must follow this
//Client
Client_Sock.create();
Client_Sock.Connect(server_adr,nport);
send(Client_Sock,buffer,strlen(buffer),0);
//Server
Server_Sock.Create(nport);//the same port
Server_Sock.Listen();
Server_Sock.Accept(tmpSock);
recv(tmpSock,buffer,strlen(buffer),0);
hope that will help
recv(tmp_Sock,buffer,nbrByte);
the last line put in the buffer the data sent by the client sock it reads only the first nbrByte of this data