[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Socket host that does not terminate response with a CRLF.
Hi Scott,
Following the specifications of the Interface Creator the interface
is a TCP/IP socket Interface.
So the interface should conform to the Internet Protocol.
Based on your remark I realized that the code sample (the timeval
structure and the select) is incorrect and had to do with an
implementation where we as client has to login but the initiative in
sending messages was with the host)(Seems that I like to create
confusion).
The Interface we now have this problem with is just making use of the
standard calls as available in FTPAPI.
That is the same as in 7 other interfaces that we have to third
parties that also classify as TCP/IP socket Interfaces. All of these
have their communication terminated by CRLF.
It might be that we just have been lucky with the other
interfaces.....
Kind regards,
Eduard Sluis.
_________________________________________________________________
From: Scott Klement <sk@xxxxxxxxxxxxxxxx>
To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Fri, July 9, 2010 6:58:42 PM
Subject: Re: Socket host that does not terminate response with a CRLF.
Hi Eduard,
I'm not understanding the connection between this and FTPAPI. It
appears that you are calling the socket API directly.
You didn't say if you are conforming to an Internet standard, or if
this
is something custom that you came up with. I'm assuming it's the
latter
-- and therefore there is no standard.
On 7/9/2010 4:10 PM, Eduard Sluis wrote:
>
> Hi Scott,
>
> Ok, we are using the capacities of FTPAPI to create a TCPIP
Socket
> Interface.
> We have many like that already.
> We normaly are the client so we will create the format that must
be
> communicated and send that to the host.
> C ' ' CHECKR BUF $H05N0
> C EVAL RC = send(TCP:%ADDR(BUF):$H05N0:
> C peFlags)
>
> Than we wait untill there is something available in the buffer.
> *
> * Check if the network buffer contains something.
>
*----------------------------------------------------------------
> * create a timeval struct, set it to 00.5 seconds:
> C eval tv_len = %size(timeval)
> C alloc tv_len tv
> C eval p_timeval = tv
> C eval tv_sec = 00
> C eval tv_usec = 500000
> C callp FD_ZERO(readset)
> C callp FD_SET(TCP: readset)
> * call select.
> C eval rc = select(TCP+1: %addr(readset):
> c *NULL: *NULL:
> c p_timeval)
>
> And if that is the case we will receive that.
> C EVAL RC = tcp_recv(TCP: buf)
> C ' ' CHECKR BUF $H05N0
> C CALLP ToEBCDIC(BUF:$H05N0)
>
> The tcp_recv is expecting a CRLF that in this case is not
provided by
> the host.
----------------------------------------------------------------------
-
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
----------------------------------------------------------------------
-
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------