diff options
-rw-r--r-- | 091socket.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/091socket.cc b/091socket.cc index bd973036..5bfea078 100644 --- a/091socket.cc +++ b/091socket.cc @@ -70,11 +70,6 @@ socket_t* server_socket(int portno) { return result; } -:(code) -void session_socket(int serverfd, socket_t* session) { - socklen_t dummy = sizeof(session->addr); - session->fd = accept(serverfd, (struct sockaddr*)&session->addr, &dummy); -} :(before "End Primitive Recipe Declarations") _ACCEPT, :(before "End Primitive Recipe Numbers") @@ -111,6 +106,11 @@ case _ACCEPT: { products.at(1).push_back(ingredients.at(0).at(0)); break; } +:(code) +void session_socket(int serverfd, socket_t* session) { + socklen_t dummy = sizeof(session->addr); + session->fd = accept(serverfd, (struct sockaddr*)&session->addr, &dummy); +} :(before "End Primitive Recipe Declarations") _READ_FROM_SOCKET, |