Problems with ST/X and Solutions

Socket>>setOption does not support IP_ADD_MEMBERSHIP

Postby tetsuo000 » 11. Nov 2010, 22:57

i am trying to write a multicast receiver client, i am trying to send an IGMP membership request containing a multicast group address out on the wire. i have done this in C by using setsockopt() with the IP_ADD_MEMBERSHIP option, with the value being an ip_mreq struct containing the multicast address. i believe this is not yet supported, but i really need it, and i am willing to add it. i have not had success modifying the smalltalk/x system code, i get bytecode compiler errors, i'm not sure if i need to do something special to modify the smalltalk system code. So i guess my question has two parts:

1. does smalltalk/x support joining multicast groups?
2. do i need anything special to modify the underlying smalltalk system to add functionality? i can see what looks like C code, but i am unable to accept changes to it.


Posts: 1
Joined: 10. Nov 2010, 17:35

Re: Socket>>setOption does not support IP_ADD_MEMBERSHIP

Postby stefan » 25. Nov 2010, 15:32

Additional to using byte coded and just-in-time compilation, ST/X comes with a Smalltalk-to-C compiler (stc) to compile Smalltalk to C code. Methods containing C-Code need to be compiled with stc. You need as well a C compiler and linker in order to compile the generated C code. In Linux, the standard gcc is used, for windows, you can use the free Borland command line tools - Use C++ compiler 5.5.

When writing inline C code, you have to be very careful. Read for further information.

Anyway, the current version of ST/X does not implement IP_ADD_MEMBERSHIP - we will look that we can implement it.
Site Admin
Posts: 10
Joined: 8. Nov 2008, 00:27

Return to Troubleshooting

Users browsing this forum: No registered users and 1 guest

Design by GB