Thanks!
Type: Posts; User: jsx-27
Thanks!
New question for you guys out there. If I was to use execvp to launch a child process could I monitor and change its variable using the parent program? Better yet, can I capture stdout from that...
I was trying to do it that way, but I think the mistake I made was putting the '&' before the variable.
Thanks.
I worked it out. What I did was stored the bytes received in a char pointer, and did the following changes to this function.
bool RECV_MSG ( SOCKET_DATA* PIPE, char *message, char *RECVD_BYTES...
The tricky part now is to count how many chars are stored in message with all those terminating characters. Since I know my buffer has been limited to just 1000, then i made sure to send out 1000....
If you look up top I do mention null... its very funny because most chars* are ended with a '\0'. If I use fwrite instead of printf, then I get a much different view of whats going on, (fwrite...
So that log I showed you terminated automatically, so then i set the option SO_NOSIGPIPE. That fixed that issue, but I'm still running into problems.
bool RECV_MSG ( SOCKET_DATA* PIPE, char *message, int BUF ) {
ssize_t status;
status = recv ( PIPE->m_sock, message, BUF, 0 );
if ( status < 0 ) {
printf...
Would there be any difference using poll(), because I've switched to that. Also, I've tried that looping method, and it turns out that I end up getting receiving errors. Then it has to go back to...
Actually, just reading up on things, it turns out I should probably use "unsigned char*" instead of "char*"? That or using wchar_t* but im lost as far as that goes.
Ok, lets just discard "DATA" it has no official use in the program as of yet. The recv() message function, I print off all data that has been recieved and it shows up the same as the string. This has...
I think part of the problem is that the gzip compressed data contains NULL characters. Would NULL chars create a problem in a char* or string?
// More stuff behind here to fetch browser response which should only be a header.
while ( true )
{
MSG = "";
if ( DEBUG1 ) {
...
I have a program that creates two sockets. One for the browser and the other connecting to the server, given in the header. As long as I modify the header option "Content-Encoded: " from...