This may be an impossible question to answer, but I'm trying to make a plugin do a tcp socket connection. Because it's a plugin, I'm using another company's API (the plugin is for Side Effects Software's Houdini). I've made standalone versions of the socket creating portion of the code which work fine, but when I write it in with the plugin code, it dies when it executes this line (no core is created):
... and when I say "it dies" - I mean it just quits the entire thing, no core, no exeption catching, nothing (Houdini usually catches seg faults and let's you know about them before it exits). The program & everything in it just quits.
std::send(sockDesc, buffer, bufferLen, 0);
Anyone have a suggestion as to what I might do to get around this? Is there another way of making the connection? Any pointers on things to look for when it comes to sockets and what I might be linking with when I compile the plugin?
I'm really green when it comes to sockets, so, like I said, this question may be impossible to answer... I'm just sick of banging my head on this.
edit: here's a little more info:
buffer is a char*
sockDesc = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)
bufferLen is correct
I'm trying to send a message from the plugin (which I'm calling the client) to a "server" - it will eventually be a licensing scheme so a company will have a license server and individual computers on their network will check licenses out from that server.