[erlang-questions] driver_create_port/4 and binary mode

Akos Korosmezey akorosmezey@REDACTED
Tue Apr 16 13:27:16 CEST 2019


Hi all,

I have problems setting binary mode in a port driver.
I am trying to use the RDMA driver

https://github.com/iamjamestl/rdma_dist

Just like with TCP, the server side creates a new port (calling
erl_driver:driver_create_port/4) upon accept. I cannot persuade this port
to return binaries instead of lists. The client side does not create a new
port and works without problem.

I tried to include the binary option in various places or passing it with
setopts, or calling set_port_control_flags(new_port,
PORT_CONTROL_FLAG_BINARY) at C level without luck. Debugging into the
emulator I saw that I was able to influence the 'control_flags' field of
the Port struct but that was apparently not enough.  Perhaps its 'state'
field is influential, at least, that is read by get_port_flags. Am I making
some trivial error here?
Thanks, best regards

Akos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190416/7ecf5d37/attachment.htm>


More information about the erlang-questions mailing list