ST 4U 254: A Simple Socket Server in VA Smalltalk
Today's Smalltalk 4 You looks at setting up a socket based listener in VA Smalltalk. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:
If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.
You can also watch it on YouTube:
Today we'll again look at using sockets for basic communication in VA Smalltalk. This time, we'll set up the socket server in VA Smalltalk, and have VW Smalltalk interact with that. To get started, load the TCP support into VA:
That loads in the basic support we need. Here's the VA code to run:
"In VA" sock := AbtSocketStream openAsServerOnHost: 'localhost' port: 8001. sock2 := sock accept. buffer :- sock2 next: 23. Transcript show: buffer; cr. sock close. "Once that's running, In VisualWorks" SocketAccessor exampleIPClient.
Once you have the VA side running, try the VW code. You should see the following in the Transcript in VA:
Need more help? There's a screencast for other topics like this which you may want to watch. Questions? Try the "Chat with James" Google gadget over in the sidebar.
Technorati Tags: smalltalk, va smalltalk, sockets
Enclosures:
[st4u254-iPhone.m4v ( Size: 2781484 )]