Convert to C#

B

Bob Miller

Hello.

I need to convert some small Java source to C#.
Can anybody help me?

============================================================================================
private SocketChannel getNBConnSock(SocketAddress local, SocketAddress
remote, Selector sel) throws Exception {
SocketChannel sock = SocketChannel.open();
sock.socket().setReuseAddress(true);
if (local != null) sock.socket().bind(local);
sock.configureBlocking(false);
SelectionKey sockKey = sock.register(sel, SelectionKey.OP_CONNECT);
sockKey.attach(this);
sock.connect(remote);
return sock;
}
============================================================================================

Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top