Hi gang,
Hope you're all keeping warm this winter. It's been very cold and snowy here in Pennsylvania. Although, it sounds like it's going to warm up this week.
My question: I am working on a project to send & receive data from a Fedex server using sockets. I am currently just getting started and just trying to get a connection to the server, but am not having any luck. Our AS400 and the Fedex server are both on the internal network, and I have been told by our network people that we are not blocking any ports. I have done a netstat -an on the Fedex server and here are the results:

Port 2000 is the port that I am trying to communicate with. Here is a snippet of code that I am trying to use to connect to the server:
// Convert IP address from dotted ecimal format to 32 bit address format.
IP = inet_addr('10.10.3.60');
Port = 2000;
// Convert IP address from dotted ecimal format to 32 bit address format.
Sock = socket(AF_INET:SOCK_STREAM:IPPROTO_IP);
// Ask the operating system for some memory to store our socket address into.
addrlen = %size(sockaddr);
p_connto = %alloc(addrlen);
// Point the socket address structure at the newly allocated area of memory.
p_sockaddr = p_connto;
// Populate the sockaddr_in structure.
sin_family = AF_INET;
sin_addr = IP;
sin_port = Port;
sin_zero = *ALLx'00';
// Connect to socket.
rc = connect(Sock: p_connto: addrlen);
IF rc < 0;
When it hits the connect, I just sits there for a minute or two, and then eventually fails with an rc of -1. I checked the TCP/IP status, and it is showing:

I have tried to TELNET to that address/port, and I couldn't get connected, although I can ping the Fedex server from our AS400.
Does anyone have any suggestions on what might be my issue, or anything else I can try to troubleshoot the situation?
Thanks in advance,
John
Hope you're all keeping warm this winter. It's been very cold and snowy here in Pennsylvania. Although, it sounds like it's going to warm up this week.
My question: I am working on a project to send & receive data from a Fedex server using sockets. I am currently just getting started and just trying to get a connection to the server, but am not having any luck. Our AS400 and the Fedex server are both on the internal network, and I have been told by our network people that we are not blocking any ports. I have done a netstat -an on the Fedex server and here are the results:
Port 2000 is the port that I am trying to communicate with. Here is a snippet of code that I am trying to use to connect to the server:
// Convert IP address from dotted ecimal format to 32 bit address format.
IP = inet_addr('10.10.3.60');
Port = 2000;
// Convert IP address from dotted ecimal format to 32 bit address format.
Sock = socket(AF_INET:SOCK_STREAM:IPPROTO_IP);
// Ask the operating system for some memory to store our socket address into.
addrlen = %size(sockaddr);
p_connto = %alloc(addrlen);
// Point the socket address structure at the newly allocated area of memory.
p_sockaddr = p_connto;
// Populate the sockaddr_in structure.
sin_family = AF_INET;
sin_addr = IP;
sin_port = Port;
sin_zero = *ALLx'00';
// Connect to socket.
rc = connect(Sock: p_connto: addrlen);
IF rc < 0;
When it hits the connect, I just sits there for a minute or two, and then eventually fails with an rc of -1. I checked the TCP/IP status, and it is showing:
I have tried to TELNET to that address/port, and I couldn't get connected, although I can ping the Fedex server from our AS400.
Does anyone have any suggestions on what might be my issue, or anything else I can try to troubleshoot the situation?
Thanks in advance,
John



Comment