windows socket problem/limitation

Matthias Lang matthias@REDACTED
Wed May 14 19:45:04 CEST 2003


Hi,

Is there a Microsoft-Windows-specific limit to how much data you're
allowed to transmit in one call to gen_tcp:send()?

I was surprised by this a few days ago:

  3> {ok, Bin} = file:read_file("my_big_file"),
  {ok,<<31,139,8,0,188,22,53...>>}
  4> size(Bin).
  5047116
  5> {ok, S} = gen_tcp:connect("172.16.2.3", 2089, []).
  {ok,#Port<0.37>}
  6> gen_tcp:send(S, Bin).
  {error, einval}

worked just fine if I took a smaller file. Works just fine with a
large file under linux. 

I believe the machine was running R8B on Windows 2k. I'm not 100%
sure---it wasn't my machine and I wasn't in a position to debug it.

Seem familiar to anyone?

Matthias



More information about the erlang-questions mailing list