
April 25th, 2002
|
Gnutella Veteran | | Join Date: March 24th, 2002 Location: Virginia
Posts: 101
| |
Quote:
Yes, I copy it with memcpy, but I must specify the size. And, if sizeof says 24bytes, I should copy 24bytes, however I need 23 bytes.
| memcpy( string, &struct, 23 ) Quote:
You say I must send a pointer to struct, mmm, if I send a pointer to data on my computer to another PC, I think it will not work.
| Obviously that would not work. I am saying to pass a pointer to the struct to your send function.
i.e.:
bytes = send( sock, (char*)&struct, 23, 0 ) |