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
Tyrannican opened this issue Jan 3, 2017 · 1 comment
Closed

GIO.Socket.Receive not filling string buffer #178

Tyrannican opened this issue Jan 3, 2017 · 1 comment

Comments

@Tyrannican
Copy link

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 as completed in 0b4c694 Jan 3, 2017
@MikeWey
Copy link
Member

MikeWey 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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants