Alaska Software Inc. - SocketRecv
Username: Password:
AuthorTopic: SocketRecv
Jonathan LeemingSocketRecv
on Sat, 17 Jan 2015 20:30:38 -0700
Hi,

I have been having a lot of fun  experimenting with websockets
(really... it is a neat technology) but belive there may be an error
in the documentation regarding the SocketRecv() function.

The documentation shows the format to be...

SocketRecv( <nSocket>  , ;
            @<cBuffer> , ;
            [<nLength>], ;
            [<nFlag>]  , ;
            [@<nError>]  ) --> nBytesRead

I belive the nFlag parameter is misplaced as I encountered problems
when using this function.

Frurther investigation shows the Alaska samples (line 208 in
server.prg)  appers to confirm my suspicions...

nBytes := SocketRecv( ::nSocket, @cLength, 4, @nError )

Where nFlag does not have a presence defined appears to confirm this.

I would thinks that the function is expecting...

SocketRecv( <nSocket>  , ;
            @<cBuffer> , ;
            [<nLength>], ;
            [@<nError>]  ) --> nBytesRead

But of course I could only speculate where< nFlag> fits in.

Regards... Jonathan
Andreas HerdtRe: SocketRecv
on Fri, 23 Jan 2015 11:26:18 +0100
Hi Jonathan,

The documentation is correct regarding the parameter profile. Checking the 
samples I realize that infact the code is not according documentation. I 
took a note to have it corrected in a future update.

The reason why the sample is working is because the variable nError is 
assigned the numeric value 0 which is a valid flag.

With my best regards,

Andreas Herdt
Alaska Software

--------------------------------------------------------------------

Technical Support: support@alaska-software.com

News Server: news.alaska-software.com
Homepage: http://www.alaska-software.com
WebKnowledgeBase: http://www.alaska-software.com/kbase.shtm

Fax European Office: +49 (0) 61 96 - 77 99 99 23
Fax US Office: +1 (646) 218 1281
--------------------------------------------------------------------

"Jonathan Leeming" schrieb im Newsbeitrag 
news:279mba1139svrdma374l3nntlq75s6ap6p@4ax.com...

Hi,

I have been having a lot of fun  experimenting with websockets
(really... it is a neat technology) but belive there may be an error
in the documentation regarding the SocketRecv() function.

The documentation shows the format to be...

SocketRecv( <nSocket>  , ;
            @<cBuffer> , ;
            [<nLength>], ;
            [<nFlag>]  , ;
            [@<nError>]  ) --> nBytesRead

I belive the nFlag parameter is misplaced as I encountered problems
when using this function.

Frurther investigation shows the Alaska samples (line 208 in
server.prg)  appers to confirm my suspicions...

nBytes := SocketRecv( ::nSocket, @cLength, 4, @nError )

Where nFlag does not have a presence defined appears to confirm this.

I would thinks that the function is expecting...

SocketRecv( <nSocket>  , ;
            @<cBuffer> , ;
            [<nLength>], ;
            [@<nError>]  ) --> nBytesRead

But of course I could only speculate where< nFlag> fits in.

Regards... Jonathan