Re: TCP Messages to Server
Not possible on a shared web hosting service as I doubt they'll permit you to run any sort of service and may be locked down a lot further depending on how switched on the provider is. VPS will do it no dramas. You'll need to write some sort of service to bind to an external IP and port. Piece of piss and heaps of code around to start from. David. David Connors da...@connors.com | M +61 417 189 363 Download my v-card: https://www.codify.com/cards/davidconnors Follow me on Twitter: https://www.twitter.com/davidconnors Connect with me on LinkedIn: http://au.linkedin.com/in/davidjohnconnors On Tue, Sep 10, 2013 at 6:23 PM, Paul Evrat p...@paulevrat.com wrote: Hi All, ** ** I want to receive raw TCP messages from an industrial device (that has an in-built modem) at a *shared* web hosting service, is this possible? ** ** The modem requires an IP address and port number to send the messages to.* *** ** ** I have received TCP messages before on a PC connected to the internet using TcpListener(My Static IP, port number) by opening that port number on the router but can it be done with a hosting service (pref shared hosting) instead? ** ** I imagine an IP would be necessary to attach to the hosting address but would this work given the Listener must address a port number? ** ** If not on shared hosting would a VPS do this? (Haven’t used one before.)* *** ** ** Any pointers greatly appreciated. ** ** Regards .. Paul .. ** ** ** ** ** **
RE: TCP Messages to Server
You probably could if you use assumed port 80and got your modem to send a simulated page get with the headers From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Connors Sent: Tuesday, 10 September 2013 6:31 PM To: ozDotNet Subject: Re: TCP Messages to Server Not possible on a shared web hosting service as I doubt they'll permit you to run any sort of service and may be locked down a lot further depending on how switched on the provider is. VPS will do it no dramas. You'll need to write some sort of service to bind to an external IP and port. Piece of piss and heaps of code around to start from. David. David Connors mailto:da...@connors.com da...@connors.com | M +61 417 189 363 Download my v-card: https://www.codify.com/cards/davidconnors Follow me on Twitter: https://www.twitter.com/davidconnors Connect with me on LinkedIn: http://au.linkedin.com/in/davidjohnconnors On Tue, Sep 10, 2013 at 6:23 PM, Paul Evrat p...@paulevrat.com wrote: Hi All, I want to receive raw TCP messages from an industrial device (that has an in-built modem) at a shared web hosting service, is this possible? The modem requires an IP address and port number to send the messages to. I have received TCP messages before on a PC connected to the internet using TcpListener(My Static IP, port number) by opening that port number on the router but can it be done with a hosting service (pref shared hosting) instead? I imagine an IP would be necessary to attach to the hosting address but would this work given the Listener must address a port number? If not on shared hosting would a VPS do this? (Haven’t used one before.) Any pointers greatly appreciated. Regards .. Paul ..
RE: TCP Messages to Server
Actually if I could turn it into a http request with a query string that would make the web code simple. Is it just a matter of having http headers? The modem data does attached to a web site. Hosting terms seem to allow a service as long as it integral to the site, which it is. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of anthonyatsmall...@mail.com Sent: Tuesday, 10 September 2013 7:20 PM To: 'ozDotNet' Subject: RE: TCP Messages to Server You probably could if you use assumed port 80and got your modem to send a simulated page get with the headers From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Connors Sent: Tuesday, 10 September 2013 6:31 PM To: ozDotNet Subject: Re: TCP Messages to Server Not possible on a shared web hosting service as I doubt they'll permit you to run any sort of service and may be locked down a lot further depending on how switched on the provider is. VPS will do it no dramas. You'll need to write some sort of service to bind to an external IP and port. Piece of piss and heaps of code around to start from. David. David Connors mailto:da...@connors.com da...@connors.com | M +61 417 189 363 Download my v-card: https://www.codify.com/cards/davidconnors Follow me on Twitter: https://www.twitter.com/davidconnors Connect with me on LinkedIn: http://au.linkedin.com/in/davidjohnconnors On Tue, Sep 10, 2013 at 6:23 PM, Paul Evrat p...@paulevrat.com wrote: Hi All, I want to receive raw TCP messages from an industrial device (that has an in-built modem) at a shared web hosting service, is this possible? The modem requires an IP address and port number to send the messages to. I have received TCP messages before on a PC connected to the internet using TcpListener(My Static IP, port number) by opening that port number on the router but can it be done with a hosting service (pref shared hosting) instead? I imagine an IP would be necessary to attach to the hosting address but would this work given the Listener must address a port number? If not on shared hosting would a VPS do this? (Haven’t used one before.) Any pointers greatly appreciated. Regards .. Paul .. No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.3392 / Virus Database: 3222/6651 - Release Date: 09/09/13
RE: TCP Messages to Server
Yes it is..use firebug or jsfiddler to get a standard template(with headers) you could use. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Paul Evrat Sent: Tuesday, 10 September 2013 7:29 PM To: 'ozDotNet' Subject: RE: TCP Messages to Server Actually if I could turn it into a http request with a query string that would make the web code simple. Is it just a matter of having http headers? The modem data does attached to a web site. Hosting terms seem to allow a service as long as it integral to the site, which it is. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of anthonyatsmall...@mail.com Sent: Tuesday, 10 September 2013 7:20 PM To: 'ozDotNet' Subject: RE: TCP Messages to Server You probably could if you use assumed port 80and got your modem to send a simulated page get with the headers From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Connors Sent: Tuesday, 10 September 2013 6:31 PM To: ozDotNet Subject: Re: TCP Messages to Server Not possible on a shared web hosting service as I doubt they'll permit you to run any sort of service and may be locked down a lot further depending on how switched on the provider is. VPS will do it no dramas. You'll need to write some sort of service to bind to an external IP and port. Piece of piss and heaps of code around to start from. David. David Connors mailto:da...@connors.com da...@connors.com | M +61 417 189 363 Download my v-card: https://www.codify.com/cards/davidconnors Follow me on Twitter: https://www.twitter.com/davidconnors Connect with me on LinkedIn: http://au.linkedin.com/in/davidjohnconnors On Tue, Sep 10, 2013 at 6:23 PM, Paul Evrat p...@paulevrat.com wrote: Hi All, I want to receive raw TCP messages from an industrial device (that has an in-built modem) at a shared web hosting service, is this possible? The modem requires an IP address and port number to send the messages to. I have received TCP messages before on a PC connected to the internet using TcpListener(My Static IP, port number) by opening that port number on the router but can it be done with a hosting service (pref shared hosting) instead? I imagine an IP would be necessary to attach to the hosting address but would this work given the Listener must address a port number? If not on shared hosting would a VPS do this? (Haven’t used one before.) Any pointers greatly appreciated. Regards .. Paul .. No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.3392 / Virus Database: 3222/6651 - Release Date: 09/09/13
RE: TCP Messages to Server
Anthony / David, Thanks, seems to work well on shared hosting using port 80. The following seems to be the minimum construct for a raw TCP message to become a HTTP request - Message = GET /default.aspx?Msg=ddrrggffdd HTTP/1.1 vbCrLf Host: www.mugachino.com vbCrLf vbCrLf The server returned the following - HTTP/1.1 200 OK Cache-Control: private Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/7.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Wed, 11 Sep 2013 05:24:15 GMT Content-Length: 1338 Strangely the HTML section did not come through in the NetworkStream ?? My objective is achieved (I don’t need the reply and only want to pass the query string) but it would be good to know what happened to the html portion. Regards, From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of anthonyatsmall...@mail.com Sent: Tuesday, 10 September 2013 8:05 PM To: 'ozDotNet' Subject: RE: TCP Messages to Server Yes it is..use firebug or jsfiddler to get a standard template(with headers) you could use. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Paul Evrat Sent: Tuesday, 10 September 2013 7:29 PM To: 'ozDotNet' Subject: RE: TCP Messages to Server Actually if I could turn it into a http request with a query string that would make the web code simple. Is it just a matter of having http headers? The modem data does attached to a web site. Hosting terms seem to allow a service as long as it integral to the site, which it is. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of anthonyatsmall...@mail.com Sent: Tuesday, 10 September 2013 7:20 PM To: 'ozDotNet' Subject: RE: TCP Messages to Server You probably could if you use assumed port 80and got your modem to send a simulated page get with the headers From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Connors Sent: Tuesday, 10 September 2013 6:31 PM To: ozDotNet Subject: Re: TCP Messages to Server Not possible on a shared web hosting service as I doubt they'll permit you to run any sort of service and may be locked down a lot further depending on how switched on the provider is. VPS will do it no dramas. You'll need to write some sort of service to bind to an external IP and port. Piece of piss and heaps of code around to start from. David. David Connors mailto:da...@connors.com da...@connors.com | M +61 417 189 363 Download my v-card: https://www.codify.com/cards/davidconnors Follow me on Twitter: https://www.twitter.com/davidconnors Connect with me on LinkedIn: http://au.linkedin.com/in/davidjohnconnors On Tue, Sep 10, 2013 at 6:23 PM, Paul Evrat p...@paulevrat.com wrote: Hi All, I want to receive raw TCP messages from an industrial device (that has an in-built modem) at a shared web hosting service, is this possible? The modem requires an IP address and port number to send the messages to. I have received TCP messages before on a PC connected to the internet using TcpListener(My Static IP, port number) by opening that port number on the router but can it be done with a hosting service (pref shared hosting) instead? I imagine an IP would be necessary to attach to the hosting address but would this work given the Listener must address a port number? If not on shared hosting would a VPS do this? (Haven’t used one before.) Any pointers greatly appreciated. Regards .. Paul .. No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.3392 / Virus Database: 3222/6651 - Release Date: 09/09/13 No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.3392 / Virus Database: 3222/6651 - Release Date: 09/09/13