![]() |
| | #1 |
| #C-help Join Date: Jun 2007 Location: Las Vegas
Posts: 53
| Forking Issue... I wanted to write an Encrypted Chat System(p2p) and I did. But, I encountered major problems. To begin with, I know I should have used threading(not forking) for this...but I am learning threads now. I wanted to get this done faster and forking(with though less efficient) seemed to be the best way to do it(at least to me, it did). I managed to get it working, but the interface is messed up. It is very messy and it prints the messages in combination with the system messages.(they are all scrambled. I would be very thankful if you had the posibility to compile the program for me and see what I am talking about). I know I could use ncruses library to make an interface for it or even java(swing/awt)(IDK GTK), but I prefer to make it "pure" command line. So if there is any way to make the messages stay on sync and be arranged nicely...I would be very pleased. Here is the source code: http://rafb.net/p/Gnb5jE30.html I know there are some useless lines and the code is very bad...but I will organize it and remove the useless lines.
__________________ <<deleted because of colour and size abuse>> |
| cookie is offline | |
| | #2 |
| FOSS Enthusiast Join Date: Jun 2008 Location: Germany
Posts: 64
| there are some issues with it. First, I need the ECScrypt.h for compiling. Second, for connect(), bind() and accept() the second argument is a struct sockaddr* so you need typecasting. In your case it'd look like this: Code: connect(clisock, (struct sockaddr*)&clisock_addr, addrlen) |
| mkruk is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Some weird issue. | dbzx | C Programming | 7 | 04-12-2009 04:10 PM |
| float calculation issue | George2 | C# Programming | 1 | 05-26-2008 04:56 AM |
| type safe issue | George2 | C++ Programming | 4 | 02-12-2008 09:32 PM |
| [Beginner Thread] Issue with "string" handling and memory leaks | mas0 | C++ Programming | 8 | 01-17-2006 05:39 PM |
| my first issue of GDM | DavidP | A Brief History of Cprogramming.com | 0 | 09-12-2002 04:02 PM |