Highlighted

Anyone manage to get socket.listen working?

Explorer ,
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

118

Likes

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

Anyone manage to get socket.listen working?

Explorer ,
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

119

Likes

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
Jun 26, 2019 0
New Here ,
Oct 11, 2020

Copy link to clipboard

Copied

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.

 

Likes

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
Reply
Loading...
Oct 11, 2020 0