|
-
October 6th, 2003, 11:11 AM
#16
-
October 6th, 2003, 07:34 PM
#17
-
October 7th, 2003, 09:22 AM
#18
-
October 7th, 2003, 11:12 AM
#19
-
October 7th, 2003, 11:56 AM
#20
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
-
October 7th, 2003, 12:05 PM
#21
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
wat does the last second line do?
-
October 7th, 2003, 12:14 PM
#22
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
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
|