Lines Matching refs:socket
14 use smoltcp::socket::tcp;
128 let mut socket = sockets.get_mut::<tcp::Socket>(server_handle); in main() localVariable
129 if !socket.is_active() && !socket.is_listening() { in main()
132 socket.listen(1234).unwrap(); in main()
137 if socket.can_recv() { in main()
140 socket.recv(|buffer| { (buffer.len(), str::from_utf8(buffer).unwrap()) }) in main()
142 socket.close(); in main()
146 let mut socket = sockets.get_mut::<tcp::Socket>(client_handle); in main() localVariable
148 if !socket.is_open() { in main()
151 socket in main()
158 if socket.can_send() { in main()
160 socket.send_slice(b"0123456789abcdef").unwrap(); in main()
161 socket.close(); in main()