Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OMRSOCK API: Implement omrsock_sendto and omrsock_recvfrom functions on Unix #5128

Closed
8 tasks done
caohaley opened this issue Apr 27, 2020 · 0 comments
Closed
8 tasks done

Comments

@caohaley
Copy link
Contributor

Working on Issue: #4102
/cc @rwy0717 @mpirvu

Omrsock functions to be implemented:
omrsock_sendto, omrsock_recvfrom

Descriptions

omrsock_sendto and omrsock_recvfrom can be used for connected or connectionless sockets. If used on connected sockets, the destination address will be ignored. omrsock_sendto and omrsock_recvfrom both will block until the messages are sent/received. You can set the socket option to be non_blocking, or with timeouts, but this functionality has yet to be added to omrsock api. It will be added in the near future.

omrsock_sendto blocks and sends a message of specified length, with specified flags to the destination address and returns the number of bytes actually sent.

omrsock_recvfrom blocks and waits for a message to be received into the buffer that that user pre-allocates that has specified in length from the specified source address.

Implementation Details:

The omrsock_sendto and omrsock_recvfrom functions will be set up to call the system socket api sendto and recvfrom functions. It will be tested to see if it works on all Unix systems and if there is anything to be added.

The available flags will be added later on.

Unix Progress Tracker

caohaley pushed a commit to caohaley/omr that referenced this issue Apr 29, 2020
Added omrsock_sendto and omrsock_recvfrom unix implementation

- Both functions uses function calls to system sendto and recvfrom
  socket api functions.
- Both functions checks for invalid arguments and saves errno using
  set_last_error and returns the bytes sent/received.
- recvfrom function can take NULL for addrHandle argument when user
  does not want to know who the message was from.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Apr 29, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- However, because of the inconsistency in receiving the message
  for datagram communication, the recvfrom test is commented out.
- Sending many messages shows locally that that recvfrom
  functionality does work.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue May 3, 2020
Added omrsock_sendto and omrsock_recvfrom unix implementation

- Both functions uses function calls to system sendto and recvfrom
  socket api functions.
- Both functions checks for invalid arguments and saves errno using
  set_last_error and returns the bytes sent/received.
- recvfrom function can take NULL for addrHandle argument when user
  does not want to know who the message was from.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue May 3, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- However, because of the inconsistency in receiving the message
  for datagram communication, the recvfrom test is commented out.
- Sending many messages shows locally that that recvfrom
  functionality does work.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue May 10, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- However, because of the inconsistency in receiving the message
  for datagram communication, the recvfrom test is commented out.
- Sending many messages shows locally that that recvfrom
  functionality does work.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue May 19, 2020
Added omrsock_sendto and omrsock_recvfrom unix implementation

- Both functions uses function calls to system sendto and recvfrom
  socket api functions.
- Both functions checks for invalid arguments and saves errno using
  set_last_error and returns the bytes sent/received.
- recvfrom function can take NULL for addrHandle argument when user
  does not want to know who the message was from.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue May 19, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- However, because of the inconsistency in receiving the message
  for datagram communication, the recvfrom test is commented out.
- Sending many messages shows locally that that recvfrom
  functionality does work.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 15, 2020
Added omrsock_sendto and omrsock_recvfrom unix implementation

- Both functions uses function calls to system sendto and recvfrom
  socket api functions.
- Both functions checks for invalid arguments and saves errno using
  set_last_error and returns the bytes sent/received.
- recvfrom function can take NULL for addrHandle argument when user
  does not want to know who the message was from.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 15, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- However, because of the inconsistency in receiving the message
  for datagram communication, the recvfrom test is commented out.
- Sending many messages shows locally that that recvfrom
  functionality does work.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 15, 2020
Added omrsock_sendto and omrsock_recvfrom unix implementation

- Both functions uses function calls to system sendto and recvfrom
  socket api functions.
- Both functions checks for invalid arguments and saves errno using
  set_last_error and returns the bytes sent/received.
- recvfrom function can take NULL for addrHandle argument when user
  does not want to know who the message was from.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 15, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- However, because of the inconsistency in receiving the message
  for datagram communication, the recvfrom test is commented out.
- Sending many messages shows locally that that recvfrom
  functionality does work.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 16, 2020
Added omrsock_sendto and omrsock_recvfrom unix implementation

- Both functions uses function calls to system sendto and recvfrom
  socket api functions.
- Both functions checks for invalid arguments and saves errno using
  set_last_error and returns the bytes sent/received.
- recvfrom function can take NULL for addrHandle argument when user
  does not want to know who the message was from.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 16, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- However, because of the inconsistency in receiving the message
  for datagram communication, the recvfrom test is commented out.
- Sending many messages shows locally that that recvfrom
  functionality does work.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 16, 2020
Added omrsock_sendto and omrsock_recvfrom unix implementation

- Both functions uses function calls to system sendto and recvfrom
  socket api functions.
- Both functions checks for invalid arguments and saves errno using
  set_last_error and returns the bytes sent/received.
- recvfrom function can take NULL for addrHandle argument when user
  does not want to know who the message was from.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 16, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 16, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 16, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 16, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 16, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 16, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 17, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 17, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 17, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 17, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 18, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jun 19, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jul 2, 2020
Added omrsock_sendto and omrsock_recvfrom unix implementation

- Both functions uses function calls to system sendto and recvfrom
  socket api functions.
- Both functions checks for invalid arguments and saves errno using
  set_last_error and returns the bytes sent/received.
- recvfrom function can take NULL for addrHandle argument when user
  does not want to know who the message was from.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jul 2, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jul 2, 2020
Added omrsock_sendto and omrsock_recvfrom unix implementation

- Both functions uses function calls to system sendto and recvfrom
  socket api functions.
- Both functions checks for invalid arguments and saves errno using
  set_last_error and returns the bytes sent/received.
- recvfrom function can take NULL for addrHandle argument when user
  does not want to know who the message was from.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jul 2, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jul 2, 2020
Added omrsock_sendto and omrsock_recvfrom unix implementation

- Both functions uses function calls to system sendto and recvfrom
  socket api functions.
- Both functions checks for invalid arguments and saves errno using
  set_last_error and returns the bytes sent/received.
- recvfrom function can take NULL for addrHandle argument when user
  does not want to know who the message was from.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jul 2, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jul 2, 2020
Added to two_socket_communication test in omrsockTest.cpp

- Added test case that involves datagram communication.
- Set timeout for sendto and recvfrom to be 2 seconds.
- However, because of the inconsistency in receiving the message
  for datagram communication, the message is sent 50 times and
  received using recvfrom for up to 50 times until it receives
  the same number of bytes as it sent.
- Fixed some warnings regarding to comparison between unsigned
  length and integer in omrsockTest.cpp for other test cases.

Issue: eclipse-omr#5128

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants