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

need example help #2

Open
kulasama opened this issue Mar 11, 2012 · 4 comments
Open

need example help #2

kulasama opened this issue Mar 11, 2012 · 4 comments

Comments

@kulasama
Copy link

i don't familiy with rust. would you provide some rust socket example for people. make them use this library more easy?

@jdm
Copy link
Owner

jdm commented Mar 11, 2012

There are a couple examples in the test code at the bottom of the source file, if that helps.

@kulasama
Copy link
Author

i try to follow test code.

and write a funtion like this.

39 result::chain(connect("localhost", 80 as u16)) {|s|
40 send(s,str::bytes("hello world"));
41 };

but compiler tell me that

http.rs:39:4: 39:50 error: cannot determine a type for this expression.

no such example for do a client socket work.

@jdm
Copy link
Owner

jdm commented Mar 12, 2012

I think if you get rid of the ; on line 40 it might work.

@jdm
Copy link
Owner

jdm commented Mar 12, 2012

Or line 41, I forget.

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