Socket icon indicating copy to clipboard operation
Socket copied to clipboard

Fix node remote address

Open Pierozi opened this issue 7 years ago • 12 comments

This PR fix the bug related to the remote address of a connection.

  • As the Server handle multiple connections, it must keep the remote of each node.

Pierozi avatar Mar 23 '17 09:03 Pierozi

ping?

Hywan avatar Apr 24 '17 19:04 Hywan

Thanks for the reminder, I will check soon for implement into the node.

Pierozi avatar Apr 27 '17 12:04 Pierozi

Coverage Status

Coverage decreased (-0.4%) to 87.427% when pulling 848c53127342fb2563a1754f2fbbdaf8a21cdd8f on Pierozi:fix/node-remote-address into 98199af6fbbd5fc5280861043127b94e1fce5e91 on hoaproject:master.

coveralls avatar May 02 '17 12:05 coveralls

Coverage Status

Coverage decreased (-0.4%) to 87.427% when pulling 48bc77acd1972a492d9fdf3d1990a84a95ce1719 on Pierozi:fix/node-remote-address into 98199af6fbbd5fc5280861043127b94e1fce5e91 on hoaproject:master.

coveralls avatar May 02 '17 12:05 coveralls

@Hywan I've made change in order to use \Hoa\Socket\Node the design and logic are much better like this.

Pierozi avatar May 02 '17 13:05 Pierozi

@Hywan address on stream_socket_recvfrom isn't working properly, return empty string.

Pierozi avatar May 02 '17 15:05 Pierozi

I've a concern regarding the implementation of new method getPeerName if the developer has implemented his own Node, this would break the behavior.

Pierozi avatar May 02 '17 15:05 Pierozi

Options regarding possible BC break.

  • make getRemoteAddress compatible if Node does not have method getPeerName The overhead is minimal like it's one line of code to do the job.
  • Create an Abstract class of Node, and encourage people to extend it for their own node.

@hoaproject/hoackers thought?

Pierozi avatar May 24 '17 09:05 Pierozi

There is already an abstract node class: Node :-].

I don't like having method_exists checks, this is ugly, slow, and error-prone. Let's add it, or break it with PHP 5.x drop.

Hywan avatar May 29 '17 07:05 Hywan

Vote for Break it :+1:

Pierozi avatar May 30 '17 07:05 Pierozi

@Hywan Ping status?, I have another PR that will concerne same piece of code.

Pierozi avatar Aug 20 '17 10:08 Pierozi

Now that hoa/option is about to be released, we will start to introduce BC break. I will focus on hoa/socket as soon as possible (we need to release other libraries before, but I can lead my work to hoa/socket first).

Hywan avatar Aug 21 '17 07:08 Hywan