CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
  1. #16
    Join Date
    Sep 2003
    Posts
    82

  2. #17
    Join Date
    Sep 2003
    Posts
    82

  3. #18
    Join Date
    Sep 2003
    Posts
    82

  4. #19
    Join Date
    Sep 2003
    Posts
    82

  5. #20
    Join Date
    Mar 2003
    Location
    Morocco
    Posts
    257
    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

  6. #21
    Join Date
    Sep 2003
    Posts
    82
    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?

  7. #22
    Join Date
    Mar 2003
    Location
    Morocco
    Posts
    257
    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

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured