Highlighted
Absent Member.
Absent Member.
1665 views

[archive] c$socket

[Migrated content. Thread originally posted on 09 January 2004]

I'm having a problem related with the "c$socket" routine, i'm trying to comunicate with a Java aplication and the comunication is established, but no data is passed, when I make a write the other aplication receives nothing and when I make a read acucobol keeps waiting for data and doesn't receive nothing. Can someone help me out ? Thx.
0 Likes
8 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] c$socket

I can't help you but I did play with that a couple months ago and ran into the exact same problem!
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] c$socket

We have multiple examples showing how to use the c$socket routine, some of them in the sample directory. Have you looked there?

Also, remember to think about c$socket like a file. You must use the sequences: open, read/write and close.

And don't forget the server, one side must be the server, which then will have to wait listening for incoming "calls", when there is one, it has to be answered and there goes.

Please provide a particular example, and we might figure out what your problem is.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] c$socket

I am using the examples that arrived in the instalation CD and I'm trying to comunicate with a java aplication, I realised that c$socket works like a file, and when I make the open it all works fine (the comunication is established) the problem is in the read and writes, no information is passed.
Thx.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] c$socket

Note that the read has to be syncronized with a write on the other computer. That is in the nature of sockets, not due to ACUCOBOL-GT. It is hard to indicate anything without any source to relate to.

Any chance of a small reproducable, or perhaps you should take this with Technical support?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] c$socket

I was able to get the example from the sample directory working with a simple java program after a suggestion from one of our techies, it required using a port > 1024. For some reason ports below that are handled differently on our AIX system.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] c$socket

Ports below 1024 are handled specially on all (well, most) systems, UNIX and Windows. They are considered priveleged ports, and only admins/root can establish a socket on such a port. That is a long-standing limitation of sockets in general.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] c$socket

I'm trying to communicate by the "c$socket" with a www-server at port 80.
The purpose is to send a html request to a www-server and to receive the answer. Although the answer (of course) is in html format, this is no problem. I only want to filter out a status. The problem is to send the request. If i use a format 'http://mydomain.com/index.html(crlf)' as string and send it to the server, there will be no response. When I send 2 times 'list' ?? the server response with a html-string with the message ' invalid method in request'. So there is a connection. Can someone tell me if it is possible to send this request and if, how to format the request the www-server will recognise it. Thx.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] c$socket

The Hypertext Transfer Protocol -- HTTP/1.1 specification is here:

ftp://ftp.isi.edu/in-notes/rfc2616.txt

Jump down to the request section to find what your looking for.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.