Вопросы по сети и многопоточности (пишу небольшой xmpp-клиент)

Applications development, KoOS API questions
  • Welcome to the forums,

    Unfortunately, I could not understand all your questions (google translate's Russian is bad, and my own is even worse.)
    Threads and processes in KolibriOS are the same thing, so it's not possible to have one process with multiple threads as in linux/windows.
    Socket functions only work properly in the thread where the socket was opened.

    If you don't need multiple windows, it might be best to use non-blocking sockets, and run everything in one thread.
    Perhaps you can borrow some code of the IRC client for your XMPP experiments.

    Good luck!
    "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein
  • thx, so it's better to use 1 thread/window. That's a bit sad but ok, i was trying to make it with multiple windows like pidgin or old skype.

    the second question was about t_edit from box_lib. Because of lack of docs i'm just poking it randomly, and the question was is there any way to make it look a bit better. TinyPad looks good, but it uses pure canvas drawing (and i'm afraid that'd be too much for me to handle).

    the third question was about mtdbg and threads, but since i'll try to convert everything into 1 thread, it doesn't matter now.
  • It's certainly possible to run with multiple windows later. But I would use only one thread for the first version(s), for simplicity.

    For box lib, there is the text and html documentation in source code tree. (http://websvn.kolibrios.org/listing.php ... box_lib%2F)
    There is also this page on the wiki: http://wiki.kolibrios.org/wiki/Box_lib/ru and countless examples on SVN ofcourse.

    Please, bare in mind that textbox in box_lib has no multi-line support. (That's why I wrote my own multi-line, multi-color, read-only text box in IRC client.)

    I'm not sure about thread support in MTDBG, so will not answer that question at this point.
    Last edited by hidnplayr on Mon May 25, 2015 11:04 pm, edited 1 time in total.
    "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein
  • The man i'm using for t_edit is the one from svn. Not the best one, maybe, but still useful, at least it's possible to use source if in doubt. Also, it's t_edit, not editbox, so it can handle multiline, and its input can be easily pruned down to arrows/ctrl+c. The only problem is how it looks :( Actually, right now sending messages works ok (or 90% ok).

    About windows - is there any way to make second window in one process? Or it's just 1 process == 1 window?
  • Oh okay. I have not worked with t_edit so cannot help you with that, but it should work with multiline indeed.

    There is only one window per process possible. Unfortunately.
    "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein
  • ok, thx for help :) maybe i'll still try ipc, like if one logic chain fails to parse the query, it just calls yet another logic chain over ipc.
  • Who is online

    Users browsing this forum: No registered users and 11 guests