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

GIO.Socket.Receive not filling string buffer #178

Closed
ShinRa26 opened this issue Jan 3, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@ShinRa26
Copy link

commented Jan 3, 2017

When using the GIO.Socket.Receive method to receive data from my server, the data does not fill the string buffer I have set up. E.g.

string buffer = new string(512);
auto recv = client.receive(buffer, null);
writefln("Received %d bytes as: %s", recv, buffer);

The print out says I receive the correct amount of bytes but just prints out 512 bytes of emptiness...

Is this a bug in the Socket.receive method or am I missing something here?

@MikeWey MikeWey closed this in 0b4c694 Jan 3, 2017

@MikeWey

This comment has been minimized.

Copy link
Member

commented Jan 3, 2017

I've corrected the binding for the receive and receiveFrom functions.

The type of the buffer was changed to a char[] since the chars aren't immutable if the function is going to change them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.