• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Anyone manage to get socket.listen working?

Explorer ,
Jun 26, 2019 Jun 26, 2019

Copy link to clipboard

Copied

Fro the official docs:

conn=newSocket;

// listen on port 80

if(conn.listen(80)) {

// wait forever for a connection

varincoming;

doincoming=conn.poll();

while(incoming==null);

// discard the request

conn.read();

// Reply with a HTTP header

incoming.writeln("HTTP/1.0 200 OK");

incoming.writeln("Content-Type: text/html");

incoming.writeln();

// Transmit a dummy homepage

incoming.writeln("<html><body><h1>Homepage</h1></body></html>");

// done!

incoming.close();

deleteincoming;

}

else{

alert(conn.error);

}

returns "I/O error" as soon as it runs (on OSx)


Anyone know how to get it listening?

TOPICS
Scripting

Views

203

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 11, 2020 Oct 11, 2020

Copy link to clipboard

Copied

LATEST

Greetings.

I stumbled upon the same problem.

I managed to script a fully functioning render server with the Socket Object in a Windows PC but when I try it on a Mac I get the I/O error.

 

Any help would be appreciated.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines