[erlang-questions] inet setoptions after receive data

Pedro Marques da Silva <>
Wed Mar 4 15:40:07 CET 2015


Hi,

I have looked before I post the question and is not clear why this will
happen.

Maybe is not possible to switch from {packet,0} to {packet,4} after
receiving data on a socket!

Best

pms




--
Pedro Marques da Silva
---------------------------------------------------
E-mail Pessoal : 
---------------------------------------------------

2015-03-04 11:25 GMT+00:00 Rad Gruchalski <>:

>  Hi Pedro,
>
> You should have a look at inet:setopts
> http://www.erlang.org/doc/man/inet.html#setopts-2
>
>  Kind regards,
> Radek Gruchalski
>  <>
> de.linkedin.com/in/radgruchalski/
>
>
> *Confidentiality:*This communication is intended for the above-named
> person and may be confidential and/or legally privileged.
> If it has come to you in error you must take no action based on it, nor
> must you copy or show it to anyone; please delete/destroy and inform the
> sender immediately.
>
> On Wednesday, 4 March 2015 at 01:48, Pedro Marques da Silva wrote:
>
> Hi Erlangers,
>
> I am doing a server to serve a flash application. When a flash client
> establish a connection(tcp socket) it sends a policy request (xml format
> message) and the server must reply with a policy file (xml file). After
> this exchange the client can connect to the socket as a regular connection.
>
>
> When I accept the connection the socket have a {packet,0} option set and
> checks if is a policy request and sends the policy file back. After this I
> change the option to {packet,4} but I do not receive anymore data. If I
> stay with {packet,0} I will receive the binary data sent by the client
>
>
> Any one knows about any problem with changing socket options after receive
> some data?
>
> thanks
> --
> Pedro Marques da Silva
> ---------------------------------------------------
> E-mail Pessoal : 
> ---------------------------------------------------
>  _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150304/efb51f25/attachment.html>


More information about the erlang-questions mailing list