supercoeus / msnp-sharp

Automatically exported from code.google.com/p/msnp-sharp
0 stars 1 forks source link

No easy to use tutorials #261

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The documentation of MSNP-Sharp is not really usable. I have been struggling 
for days to try and create a very basic bot without any joy. 

I would really like to see some real examples of how to use MSNP-Sharp. It is 
not so easy as 1-2-3 as I have discovered. 

The main critical thing I am struggling with is just trying to keep a messenger 
connected. Since there are no basic examples, and the demo app is just to 
complicated to debug, I'm at a loss. 

I would suggest that any developer with some spare time assist the Juniors to 
this project, and publish some very basic tutorials on how to use this library. 

I'm sure its brilliant once you can get it up and running, but without 
tutorials or samples, it is really difficult to get started. 

Thank you!

Original issue reported on code.google.com by leppan...@gmail.com on 9 Mar 2011 at 2:19

GoogleCodeExporter commented 8 years ago

Original comment by hepha...@gmail.com on 10 Mar 2011 at 11:27

GoogleCodeExporter commented 8 years ago
I like what you're proposing. It's a good idea.

Could I ask you a few questions however:

1. What problems do you have?
2. What format would you like the guide to be on (CHM file, HTML files, wiki 
pages, etc...)?

Original comment by electk...@gmail.com on 11 Mar 2011 at 4:55

GoogleCodeExporter commented 8 years ago
Hi Electkong. 

I think what the project really needs is rough guide to getting a messenger 
object connected and sending / receiving commands. 

I have managed to do this, so I think I'll write the documentation myself, but 
I am missing one final piece to the puzzle before I embark on the 
documentation, and also before I have a stable bot. 

So far messenger object is connected - great! able to receive input - yes! able 
to send output - yes! But for some reason the messenger object stops responding 
to input after a period of inactivity. I gather this is because it is necessary 
to implement a  "keep-alive" or ping at a regular interval. Once I can keep a 
bot connected for hours at a time, possibly even days, I'll have overcome the 
final hurdle. 

I can't say for certain exactly how long my messenger object stays connected, 
but I do know that messenger.Nameserver.SignedOff is not triggered. 

Please help solve this, and I'll put together a beginners getting started 
guide. 

Original comment by leppan...@gmail.com on 11 Mar 2011 at 4:40

GoogleCodeExporter commented 8 years ago
You need to keep sending ping (PNG) packets to MSN, so that you can keep 
yourself online.

You'll need to create an event from messenger.Nameserver.PingAnswer, and from 
there, you can get how many seconds you need to ping every time (from the 
property SecondsToWait).

Once you'll retrieved how many seconds you need to ping every time, you can get 
a timer, and set the interval to the number of seconds x 1000 (since intervals 
counts in milliseconds). Enable the timer too.

In that timer, you'll then need to call messenger.Nameserver.SendPing(), which 
will send the ping. Once the timer triggers the tick event, the ping will be 
sent. The PingAnswer event will then be raised, and again you must set the 
interval of the next ping call.

Hopefully this was relatively coherent answer. You can also check out the 
PingAnswer event and tmrKeepOnLine_Tick method being used in the 
DotMSNClient.cs class too :)

Also, good luck with your guide :D

Original comment by electk...@gmail.com on 11 Mar 2011 at 9:41

GoogleCodeExporter commented 8 years ago
Would you please create a wiki page here to share your guide? You know, what 
you are using is 5 people working almost ten years without any pay and return, 
too much complain is not a good thing.

Original comment by freezing...@gmail.com on 13 Mar 2011 at 2:13

GoogleCodeExporter commented 8 years ago

Original comment by freezing...@gmail.com on 13 Mar 2011 at 2:13