Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Running a simple TCP server
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jaap Karan Singh  
View profile  
 More options Jul 13 2012, 11:16 pm
From: Jaap Karan Singh <jks...@gmail.com>
Date: Fri, 13 Jul 2012 20:16:15 -0700 (PDT)
Local: Fri, Jul 13 2012 11:16 pm
Subject: Running a simple TCP server

Hey guys, I am trying to run a basic TCP server which simply outputs data
sent on both sides.  Can someone have a look at the code and tell me what I
am doing wrong, I've tried a few different things but to no avail.

http://pastebin.com/Deidfm7h

App details:

<https://lh6.googleusercontent.com/-U7Pd0F-mlDk/UADkb7OCOfI/AAAAAAAAGZ...>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Corey Clark  
View profile  
 More options Mar 14, 2:26 pm
From: Corey Clark <cmctr...@gmail.com>
Date: Thu, 14 Mar 2013 11:26:50 -0700 (PDT)
Local: Thurs, Mar 14 2013 2:26 pm
Subject: Re: Running a simple TCP server

Jaap

I tried to do some work with TCP on nodester a while back, I eventually got
it working but you have to change how you are doing the connections.

Since nodester uses subdomains to route traffic, you can not actually
connect directly to your application instance via a TCP connection.  The
subdomain data is lost (it is converted to the IP address of the nodester
sever, where all apps are being hosted) and therefore nodester can not
route the connection directly to your application.

The workaround is this...

Have your TCP client send an a request to your app using HTTP protocol
(REST api type stuff), this will allow its request to be sent directly to
your app being hosted on nodester.  The request should have the IP address
and port in which client wants to communicate.  The server can then take
this information and then initiate a TCP connection with the client
(Basically the client and server have to switch rolls).  Once the
connection is accepted on the client, you can communicate back and forth
with no problem.

In essence the client has to send the HTTP request, but then go into the
sever mode where it starts listening for incoming connection request.  The
app hosted on nodester now acts as a client, and send connections request
to anyone who sends a request via HTTP... essentially making it a client
that connects to multiple severs...

I am not sure how clear that explanation actually is... hopefully it will
help you get everything up and running

Corey Clark
Twitter: @CoreyClarkPhD


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »