C# equivalent of recv?
Posted
by mlh
on Stack Overflow
See other posts from Stack Overflow
or by mlh
Published on 2010-05-20T13:47:57Z
Indexed on
2010/05/20
13:50 UTC
Read the original article
Hit count: 149
Hello,
I have a portion of C code that I am trying to port over to C#.
In my C code, I create a socket and then issue a receive command. The receive command is
void receive(mysocket, char * command_buffer)
{
recv(mysocket, command_buffer, COMMAND_BUFFER_SIZE, 0);
}
now, the command buffer is returned with new values including command_buffer[8] being a pointer to a string.
I'm really confused as to how to do this in C# because C# Read() command specifically takes in bytes and not char. The important part is that I get the pointer to the string.
Any ideas?
© Stack Overflow or respective owner