Jump to content

Socket trouble on OSX


photo

Recommended Posts

Hi,

 

I am working with Unigine Socket and I have some trouble on OSX. I don't think it's a bug, seems more like a limitation from the OS.
I have a script class http. This class can make GET / POST / POST MULTIPART / POST FILE and it's working well, ... at least for windows. 
Our software do some request on php file on our server for upload some screenshot in zip format (500 Ko). The trouble is on windows the upload work, but on OSX everything seems good, the socket it's writing the good size, but after using writeStream, theorically we must be receive a response from the server, and nothing .... Seems like a limitation but I don't yet find where.

May be someone on the forum, have bigger expertise in network and can advice me about may be a limitation on OSX socket or other, I will try to use WireShark for see if I can have more info ... 

Thanks 

 

Tony

Link to comment

Hi have more details about my trouble when I change my code,  It's seems related to writeStream, if I change my code using writeChar it's working .... BTW the value return by writeStream it's correct on OS X, also writeStream work sometimes on request more light.


  // WORKING ON OSX

  for (int i = 0 ; i < requestBuffer.getSize(); i++) {
    socket.writeChar(requestBuffer.readChar());
  }


  // NOT WORKING ON OSX

  socket.writeStream(requestBuffer,requestBuffer.getSize());
Link to comment
  • 2 weeks later...

Hi Unclebob, I already play with send, 

I try with a max buffer size and call socket.writeStream inside a loop writing the same block size.

I also try to set the send value with the size of what I want send : send(requestBuffer.getSize());
 

Unfortuantely no result for now :(

Link to comment
×
×
  • Create New...