Sockets: Difference between revisions
Content deleted Content added
Nemerle implementation added. |
|||
Line 446: | Line 446: | ||
sid:sendto( "hello socket world", host, port ) |
sid:sendto( "hello socket world", host, port ) |
||
sid:close()</lang> |
sid:close()</lang> |
||
=={{header|Nemerle}}== |
|||
<lang nemerle>using System.Text; |
|||
using System.Net.Sockets; |
|||
module Program |
|||
{ |
|||
Main() : void |
|||
{ |
|||
def sock = Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); |
|||
sock.Connect("127.0.0.1", 1000); |
|||
_ = sock.Send(Encoding.ASCII.GetBytes("Hell, world!")); |
|||
sock.Close(); |
|||
} |
|||
}</lang> |
|||
=={{header|Objeck}}== |
=={{header|Objeck}}== |