Ticket #1724 (assigned patch)

Opened 4 years ago

Last modified 3 years ago

Add getprotobyname to Socket PMCs

Reported by: ocharles Owned by: nwellnhof
Priority: normal Milestone:
Component: core Version: 2.6.0
Severity: medium Keywords: sockets
Cc: Language:
Patch status: new Platform:

Description

I couldn't see any implementation of getprotobyname which seems like a standard function that should be available. This adds it to Socket PMCs.

I'm not entirely sure this is the correct approach - because normally you'd call this before creating a socket object. For PIR this is OK, but in something like Perl 6 this will create a Socket object to call getprotobyname, then destroy it, then probably create another one straight after.

Anyway, this is the best I could come up with given my extremely limited knowledge of Parrot - please advise!

Attachments

getprotobyname.patch Download (4.9 KB) - added by ocharles 4 years ago.
Adds getprotobyname to Socket
getprotobyname-dynop.patch Download (5.5 KB) - added by ocharles 4 years ago.

Change History

Changed 4 years ago by ocharles

Adds getprotobyname to Socket

Changed 4 years ago by ocharles

Changed 4 years ago by ocharles

Attached is a version of getprotobyname using the "socket_ops" dynop library - I think this is considerably better than adding it the PMC

Changed 4 years ago by bacek

Hello.

Second patch it really good. We just need someone on Win32 to complete it.

-- Bacek.

Changed 4 years ago by nwellnhof

  • owner set to nwellnhof
  • status changed from new to assigned

Changed 3 years ago by nwellnhof

It looks like the new file src/dynoplibs/socket.ops is missing from the second patch. But I think the first approach is also OK.

Note: See TracTickets for help on using tickets.