public async Task <socket_result> write(IList <ArraySegment <byte> > buff) { generator host = generator.self; return(await host.wait_result((async_result_wrap <socket_result> res) => async_write(buff, host.async_result(res)))); }
public async Task <socket_result> accept(socket_tcp sck) { generator host = generator.self; return(await host.wait_result((async_result_wrap <socket_result> res) => async_accept(sck, host.async_result(res)))); }
public async Task <socket_result> connect(string ip, int port) { generator host = generator.self; return(await host.wait_result((async_result_wrap <socket_result> res) => async_connect(ip, port, host.async_result(res)))); }