0
Socket communication via TCP-IP
New Here
,
/t5/coldfusion-discussions/socket-communication-via-tcp-ip/td-p/732168
Nov 27, 2006
Nov 27, 2006
Copy link to clipboard
Copied
Hi,
I am new to CF and would like to establish TCP-IP socket communication with a remote server. How can I exchange XML messages with a remote server / port via TCP-IP. Do I need to use the event gateways of does CF offer another way of setting up socket communication ?
Many thanks in advance !
John
I am new to CF and would like to establish TCP-IP socket communication with a remote server. How can I exchange XML messages with a remote server / port via TCP-IP. Do I need to use the event gateways of does CF offer another way of setting up socket communication ?
Many thanks in advance !
John
TOPICS
Event gateways
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explorer
,
/t5/coldfusion-discussions/socket-communication-via-tcp-ip/m-p/732169#M68206
Nov 28, 2006
Nov 28, 2006
Copy link to clipboard
Copied
You can use the supplied socket gateway to listen on a port
for messages from the other server and repsond to those messages
fairly easily.
Triggering the start of such a conversation would require a new socket class that would create a connection.
So if you only need a passive interface then you're OK, if you need to initiate the data transfer you have a lot more code to write
Triggering the start of such a conversation would require a new socket class that would create a connection.
So if you only need a passive interface then you're OK, if you need to initiate the data transfer you have a lot more code to write
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/coldfusion-discussions/socket-communication-via-tcp-ip/m-p/732170#M68207
Jun 19, 2007
Jun 19, 2007
Copy link to clipboard
Copied
Hello, how would you create a new socket class to create a
client connection?? Are you talking about writing a java class? I
have an application which I need to communicate with another server
via TCP with XML and am sitting here scratching my head. Socket
gateway won't work because it can't initiate a connection (and is a
basically a server-not a client). CFHTTP would be nice to use but
it only communicates via http or https (thus the CFHTTP tag name).
I need a CFTCP tag or similar. Ideas? Suggestions? Thanks.
Dan
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
john_mips
AUTHOR
New Here
,
/t5/coldfusion-discussions/socket-communication-via-tcp-ip/m-p/732171#M68208
Jun 20, 2007
Jun 20, 2007
Copy link to clipboard
Copied
Hi,
I faced the same problem. A Java developer in my company created a java class which has been implemented in CF by a CFX tag. So from within my CF code I can call the java class with some parameters (server, port, body message). The java class then sends the body message (XML) to the external server which replies with an XML reply message. The java class then passes the XML reply message to the calling CF page as a local variable....
I faced the same problem. A Java developer in my company created a java class which has been implemented in CF by a CFX tag. So from within my CF code I can call the java class with some parameters (server, port, body message). The java class then sends the body message (XML) to the external server which replies with an XML reply message. The java class then passes the XML reply message to the calling CF page as a local variable....
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/coldfusion-discussions/socket-communication-via-tcp-ip/m-p/732172#M68209
Jul 06, 2007
Jul 06, 2007
Copy link to clipboard
Copied
Do I need to use the event gateways of does CF offer another way
of setting up socket communication ?
I would say, yes, use the socket gateway that ships with Coldfusion. However, it has a functionality I cannot really understand. If you are a client setting up a socket to connect to the gateway, the gateway expects your code to have, beforehand, a value for the variable originatorID. Yet, originatorID is a large, unique integer that the gateway code generates when you connect. That seems to me to be a chicken-and-egg dilemma.
I would say, yes, use the socket gateway that ships with Coldfusion. However, it has a functionality I cannot really understand. If you are a client setting up a socket to connect to the gateway, the gateway expects your code to have, beforehand, a value for the variable originatorID. Yet, originatorID is a large, unique integer that the gateway code generates when you connect. That seems to me to be a chicken-and-egg dilemma.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

