From 29386109924df402199216bf240123532f7cfb9b Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 14 Sep 2010 03:11:07 -0700 Subject: [PATCH] Migrated from tutorial-sockets v4 --- Tutorial:-Sockets.textile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Tutorial:-Sockets.textile b/Tutorial:-Sockets.textile index 5ed8ab7..1b72cc6 100644 --- a/Tutorial:-Sockets.textile +++ b/Tutorial:-Sockets.textile @@ -1,11 +1,10 @@ The first thing you need to do is import the sockets module
import sockets
Then you need to create and initialize a TSocket object
-var s: TSocket = socket()
+var s: TSocket = socket()
After that you can use s.connect("addr", TPort(80)) to connect to a server
Once you connect to a server, you can send and receive messages to/from the server by using s.send("Message") to send, and s.recv() to receive. -== Examples == -=== IRC Bot === +

 import sockets, strutils