Sending Smalltalk Objects Through Socket Connections

myst

In the image above:

  • on the left is a MySmalltalk desktop application
  • in the center is MySmalltalk in a Chrome browser
  • on the right is MySmalltalk in a Safari browser

The three different instances are communicating through real-time socket connections.

In the example above, I am sending Smalltalk block objects through the socket connections – the blocks are then evaluated when they are received.

The block that I sent for the test was:

[100 timesRepeat: [:x | (x * x) prn]. TicTacToeWindow open]

The block was sent from the desktop application and was executed in both browser windows almost immediately,

This is now available online at the main site: http://mysmalltalk.com.

1) open a workspace (right click on desktop for context menu).

2) X := Socket blockTest

3) X send: [‘Hello world’ prn]

You need to open separate browser windows, not tabs, for testing.

Sockets can now support channels (Socket.io namespaces) and I will be adding “rooms” in the next few days.

The socket communication system works across all instances of MySmalltalk – mobile, browser, and desktop applications.

There will be some user created online games available over the coming weeks.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: