In case anyone else comes across this thread, the answer was to not use a 
raw socket, but rather to use a full client. There is a .NET client 
here: http://socketio4net.codeplex.com/

On Monday, January 7, 2013 2:32:13 PM UTC-8, Josh Santangelo wrote:
>
> I tried the very basic sample code from the socket.io home page in a 
> browser and that seemed to work correctly, further confirming 
> my suspicion that it's on the client side.
>
> On Monday, January 7, 2013 1:20:25 PM UTC-8, Josh Santangelo wrote:
>>
>> Thanks for the replies, all. I'm messing around with it more and not 
>> having any luck with "connect" or "connection" events. At this point I can 
>> only assume that node/socket is doing the right thing and it's my client 
>> code not connecting correctly.
>>
>> I'm having trouble finding any examples of a C# app connecting to node, 
>> but surely someone's done it? The code I'm using is very similar to the 
>> sample code at the bottom of this MSDN page: 
>> http://msdn.microsoft.com/en-us/library/system.net.sockets.socket(v=vs.95).aspx
>>
>> On Friday, January 4, 2013 7:27:35 PM UTC-8, Ben Evans wrote:
>>>
>>> Hi Josh,
>>>
>>> If it's any use to you, when i first gave Node a shot I wrote a very 
>>> basic chat app. Feel free to use it/reference: 
>>> https://github.com/bencevans/Little-Chat-Script
>>>
>>> Features:
>>>
>>> * Socket.IO Realtime Messaging
>>> * Connection Indicator
>>>
>>> and that's about it but I hope it's of some help.
>>>
>>> Good Luck and Happy Hacking!
>>>
>>> On Friday, 4 January 2013 23:38:17 UTC, Josh Santangelo wrote:
>>>>
>>>> I'm trying to build a simple server where multiple clients connect over 
>>>> TCP, and any message from a client is relayed to all the others. This 
>>>> isn't 
>>>> going to be used for a chat room, but it's basically the same idea.
>>>>
>>>> I tried building this with socket.io but got stuck pretty quickly:
>>>>
>>>> var io = require('socket.io').listen(81);
>>>>
>>>> console.log('foo');
>>>> io.sockets.on('connect', function (socket) {
>>>>   console.log('connected...');
>>>>
>>>>   socket.on('disconnect', function () {
>>>>     console.log('disconnected');
>>>>   });
>>>> });
>>>>
>>>> I see "foo" trace out, and on the client side it looks like I'm 
>>>> connected, but "connected" and "disconnected" never trace out, so I'm 
>>>> guessing those event handlers aren't working for some reason.
>>>>
>>>> I'm not married to socket.io, and actually using fewer modules would 
>>>> be better, but I'm surprised I couldn't find a code sample for this use 
>>>> case since it sounds like it's a pretty common node.js usage.
>>>>
>>>> Obviously this is my first time using node.js! Any pointers would be 
>>>> very helpful.
>>>>
>>>> thanks,
>>>> -josh
>>>>
>>>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to