[Mono-list] handling io to a descriptor in *nix
    Michael J. Ryan 
    tracker1_lists at theroughnecks.com
       
    Wed Mar 28 03:14:14 EDT 2007
    
    
  
Jonathan Pryor wrote:
>> Two external methods... 1, send a byte array via a socket descriptor.. 2, 
>> receive a single byte via a descriptor?  I wrote a small stub in C to handle 
>> this, but wasn't sure if it would be better to have a compile setting in the 
>> C# project itself to address to winsock on windows, and ??? on linux...  That 
>> way another dll/so doesn't need to be compiled in the native platform for this 
>> tiny piece.
> 
> What functions are you using to send/receive data in your C program?  If
> you're using read(2)/write(2), then you can use Mono.Unix.UnixStream (in
> Mono.Posix.dll) to read/write from the file descriptor.
> 
> If you're using send(2)/recv(2), then you'll have to do your own
> P/Invoking, as Mono.Posix.dll doesn't wrap sockets yet.
It's specifically for sockets... (Door32 for bbs doors)
-- 
Michael J. Ryan - tracker1(at)theroughnecks(dot)com - www.theroughnecks.net
icq: 4935386  -  AIM/AOL: azTracker1  -  Y!: azTracker1  -  MSN/Win: (email)
    
    
More information about the Mono-list
mailing list