7 Replies - 519 Views - Last Post: 25 May 2010 - 02:43 PM Rate Topic: -----

#1 lumus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 07-November 09

what is the best way?

Posted 25 May 2010 - 07:05 AM

hello, i want to program an app which will work somthing like a chat..
i want to send a little messages each time (containing a singel number each), trought a ftp server, what is the best way to do it?
using database? sql? uploading files?
tnx.
Is This A Good Question/Topic? 0
  • +

Replies To: what is the best way?

#2 Mion  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 64
  • Joined: 23-April 10

Re: what is the best way?

Posted 25 May 2010 - 07:15 AM

Chat.... ftp... does not compute...

Errrr well for a start instead of using FTP you should consider using either TCP or UDP really... cuts out all need for uploading files or db's...

EDIT: Of course if you have any specific questions on UDP/TCP implementation I'll try and answer them.

This post has been edited by Mion: 25 May 2010 - 07:36 AM

Was This Post Helpful? 0
  • +
  • -

#3 Sergio Tapia  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1252
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: what is the best way?

Posted 25 May 2010 - 08:25 AM

I've created a chat application using WCF.

Here's a very illustrative example on how to make one:
Link
Was This Post Helpful? 0
  • +
  • -

#4 lumus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 07-November 09

Re: what is the best way?

Posted 25 May 2010 - 09:53 AM

tnks u both..
mion, my question is what are they, i mean, how do i program an app with them?
where can i get a UDP server?

This post has been edited by lumus: 25 May 2010 - 10:10 AM

Was This Post Helpful? 0
  • +
  • -

#5 Sergio Tapia  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1252
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: what is the best way?

Posted 25 May 2010 - 10:28 AM

There are many many ways you can create a chat application. You're asking a very broad question. How do you want to implement your chat program?
Was This Post Helpful? 0
  • +
  • -

#6 lumus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 07-November 09

Re: what is the best way?

Posted 25 May 2010 - 10:43 AM

ill tell u more abput this app.. this will make my qs more focused..
the app is like a paint, only i want to connect to computers, so u will be able to see what im drawing in real time, and i will see yours..
i thought to do it this way, when u drawing (mouse down event) it will send trought (udp, smtp.. i dont know..) your cursor possion, and it will make the drawing acorrding to the possion that was recived..

what is the best way to do this (the way u see it)?
Was This Post Helpful? 0
  • +
  • -

#7 Sergio Tapia  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1252
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: what is the best way?

Posted 25 May 2010 - 10:53 AM

I've done exactly that last month for a course in Uni. Probably not the best way to do it, but hell I was strapped for time.

I dragged a PictureBox control, and then allows users to paint on it using the Graphics class and the MouseDown,MouseUp events.

Everytime the MouseUp fired I would convert the .Image of the picturebox to a byte[] and send that to the WCF Service which in turned sent that to everyone in the room, showing them the byte[] array.

In each client I had to make a method to convert the byte[] to an actual image, and draw it on the picturebox.


Kooky, spooky, but it worked.
Was This Post Helpful? 0
  • +
  • -

#8 Mion  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 64
  • Joined: 23-April 10

Re: what is the best way?

Posted 25 May 2010 - 02:43 PM

I haven't used WCF before (but I really must make a point of looking into it) but I'll give you some background on UDP/TCP

Well question one is which protocol to use. Is it ESSENTIAL that all your packets arrive in order...?

Considering like stapia says you'll be serializing image data I'd assume TCP. You can either go bare bones socket communication or if you fancy making life a bit easier for yourself the TcpClient class.

Heres the MSDN link for the TcpClient class with sample implementation code. Hope its some help!

http://msdn.microsof...28VS.71%29.aspx

This post has been edited by Mion: 25 May 2010 - 02:44 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1