Private Chat functionality for basic server

Dear all
Firstly i hope this is the best forum for my question.
I've written a basic chat server and client. The server recieves strings messages, and broadcasts them to everyone connected to it. I was wandering, sticking with exchanging Strings over the connection, what ways could I implement a private chat facility so one client could choose to send a message that would only be seen by one chosen user?
Dwarfer

Hi georgernc
I completly agree with you. I had originally used the smack api to create a client that talked with an openfire server, however was told (as i'm doing this to create an experiement for a project) that what i was writing was too 'heavy', as there was no need for using things like rooms and roosters) which to be honest is probably true.
So i went back to just writing a very basic server, with not authentication or security (i don't think i really need security as it will never be used outside of a closed network, and even then it will only be used for short periods of time) that just listens for a connection on serverSocket.accept(), reads from it when there is a message(String) arrives and then broadcast that mesage to all those connected to the server.
I'm not too sure how to progress in setting up the private chat facility without using smack and openfire (as i've been told not too). I'm going to get cracking and start playing around and see what i can come up...

Similar Messages

  • User define function for SQL Server

    Hi all,
    it's possible to write an UDF for SQL Server in Java?
    I know that it is possible with DB2 and Oracle.
    My main goal is to write an UDF that works well with all of these DB.
    Thank's

    Hi all,
    it's possible to write an UDF for SQL Server in
    Java?Okay, JDBC can talk to any database (given you have a driver implementation). Also, JDBC is like a conduit. So the real question is likely, will your database let you do this?
    I know that it is possible with DB2 and Oracle.
    My main goal is to write an UDF that works well with
    all of these DB.I also don't know what a UDF is, but if you ARE talking about stored procedures, then no, it's not possible. All databases are different. On that note, I typically recommend NEVER using stored procedures unless absolutely necessary.
    But it also sounds like you want to do this at runtime. I've seen systems that do this (bind stored procs at runtime dynamically) and it's a freakin nightmare! So be careful.

  • Sleep / wait function for Business Server Page

    Hi friends of BSP,
    on my BSP I generate at the onload function x iframes for calling BEx 7.x WebTemplates.
    It is a dynamical count of iframes depending on some URL parameters.
    Now, I get the problem, that if the count of iframes is to big, the system can not load all WebTemplates, because they are generated to fast and the system can not handle this amount of processes.
    Is there a possibility to include a wait or sleep function?
    If the answer is "yes", how to implement those functions?
    thanks for any help and support
    kind regards
    Patrick

    Hi Jamie,
    now, we us the JS method window.setTimeout().
    But there are some restrictions.
    In BSP Applications this method works only if the delayed functions is the same function calling the delayed function
    function delayFunction(index)
      var timeout
      timeout = window.setTimeout(function() { delayFunction(i) }, 1000);
    and the delayed called has to be the last step of the function
    (for exmaple there is no possibility to include the setTimeout-function in an IF condition or in any loop).
    Many thanks
    Kind regards
    Patrick

  • How to use evaluate function for sql server function

    Hi Team,
    We have imported a column(date dtat type) from SQL server cube . By default it imported as varchar,. We have three option in physical layer for this column(Varchar,Intiger,unknown)
    So we want to convert this column into date.can we use evaluate or there is any option to do that.?

    Hi,
    I am not sure your requirement. But how pass evaluate function obiee?
    syntax:- EVAULATE('your db function(%1,%2)', parameter list)
    here %1 and %2 are the no.of parameters (columns or may constant values) to be passed for the db-function
    if you have 3 parameters then you need to use %3 also.. means the columns to be passed.
    following exapmples are for ORACLE db,
    ex1: EVALUATE('upper(%1)', 'satya ranki reddy') gives the result as -> SATYA RANKI REDDY
    ex2: EVALUATE('upper(%1)', 'Markets.Region') here Markets.Region is column.
    you also can call the user-defined functions through evaulate
    EVALUATE('functioname(%1,%2), column1, column2)
    the above function has 2 parameters to be inputted
    Hope this help's
    Thanks
    Satya

  • Help functionality for basic users

    Hi,
    I was wondering if anyone knows of a good way to implement a help functionality in your dashboards.
    The users that work with our dashboards overall don't have much experience with IT, so i'd like to make a buildin function.
    This could either be a question mark at every rapport to explain what it does and how you do it, or perhaps a F1 index help like you get with Outlook.
    Does anyone have better ideas or could point out to me a good option?
    Thx,
    Erik
    Edited by: user10703465 on Nov 6, 2009 7:01 AM

    If you have your sample sales webcat and rpd with you that comes with your install(10.1.3.4) you can check the dashboards there. They have implemented the Help functionality with a link and a report.
    Any ways Let me explain
    Create a sample report with a dummy object and directly go to your static text and you can include what ever text you need like how to use the dashboards or what is that dashboard used for etc etc. Save the report
    Now go to your dashboard page and add the link object present on the left side pane and at the destination simple reference this request. Type "Help" in the caption.
    you can simply use the fmap functionality in the image layout if you have one. Sample referecing as shown below
    fmap:views/help.gif
    You can download the images online and make sure you store them under
    C:\OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res folder
    Hope it helps
    Thanks
    Prash

  • How can I create a simple chat function in a mobile app for iOS and Android

    I am wondering how can I create a chat function in my mobile app creating in AIR and Flex. The chat should be similar to the one in WhatsApp.
    Do you know some possible solutions?
    Thank you in advance!

    To enable chat messages, you need a server. The kind of server depends on the application. Do you want to create a chat like application like WhatsApp, where the server pushes messages without an active connection? Or do you have some sort of online game, where chat messages can only be transferred when the client is connected already?
    I have an online game where clients are connected to a Java server at all time. From there it is pretty straight forward:
    2 textfields:
    - 1 line textfield for input messages
    - multi-line textfield for chat history. Make sure the textfields autoscrolls to the bottom when the content changes
    on enter or button push, send a socket message to the server.
    the server broadcasts all messages to all clients that are subscribers of the chat group.

  • Microsoft forefront protection 2010 for exchange server is unable to perform the requested function

    I get the following error any time I try and change any setting:
    Microsoft Forefront Protection 2010 for Exchange Server is unable to perform the requested function. This may be becuase Microsoft ForeFront services are unavailable. Ensure that all Microsoft ForeFront services are running and that Windows Powershell is
    functional.
    I have installed the latest rollup for SEP. Rollup 5 I think. I have rebooted the server. I have checked the permissions and they are correct.
    Any thoughts?

    I posted a PowerShell-based workaround in the other thread:
    https://social.technet.microsoft.com/Forums/forefront/en-US/1ccb9a5e-4b08-4f6b-a4bd-32cf5f2cd2b0/cannot-save-any-changes-microsoft-forefront-2010-for-exchange-is-unable-to-perform-the-requested?forum=FSENext
    Mike Crowley | MVP
    My Blog --
    Baseline Technologies

  • Enabling the Export function for a distribution list in 'Private folders'

    Dears,
    Could someone please guide to the appropriate authorization that would allow the 'Export...' function for a distribution list created in a folder under 'Private folders' - Transaction : SBWP
    The option is dimmed, although the user used has the SAP_ALL profile.
    Thanks.
    Reda

    click file/publish settings/flash/actionscript settings and make sure frame 1 is set as the export frame.
    if that's already set, don't use test scene.

  • Building a simple J2ME chat client (for own J2SE-based server) Threading Qs

    Hi!
    I am making my own simple chat / messenger service to use between a couple of friends over GPRS.
    On the server side i have made a multi threaded TCP server that opens a new thread for each connecting client and stores these socket connections in a hashtable for access to send data between each thread.
    So when a client logs on to the server, the server sends a printwriter message to all other clients informing them of what client connected, and the clients can put the username in its out-database. then the clients can send messages to each others using a simple, self build protocol.
    All connection between clients/server happens over a simple printwriter on in/out streams.
    Problem is: it works perfectly most of the time.... However, sometimes a message is mysteriously lost when transferred from the server to a client. Transfer from client to server works flawlessly. I am thinking that it might have something to do with the client side threading, or slow network transfer casuing a TCP read error.
    Client structure is as following:
    start-> Midlet class -> (press connect to server) -> new Client class (impl runnable) -> new thread(this) -> void run() sets up all connections and writers, waits in a while loop for messages from server and takes action according to message type. -> Button(send) uses output stream to send a message to server.
    Do anyone have any suggestions on what I must consider when making a client that will simultaniously be able to listen for data from server as well as send data to server over 1 socket and slow mobile connection without causing any trouble?
    More info can be provided if necessary.
    Thank you!

    Building a simple J2ME chat client (for own J2SE-based server)a. i would like to say that this is a bl00dy brilliant idea. i mean ~ its been done before but building one yourself is quite thrilling.
    b. are u using java 4 or java 5. ?
    sometimes a message is mysteriously lost when transferred from the server to a client. Transfer from client to server works flawlessly.are you using push registry to recieve incoming connections.
    i recommend using a StreamConnectionNotifier connection instead of just a socket connection. you could send your data (xml/plain text) just like a stream (tcp ofcourse). if you want to know how to use a StreamConnectionNotifier connection, here's how
    try{
    // listen at local port 789
    StreamConnectionNotifier notify = (StreamConnectionNotifier) Connector.open(“http://:789”);
    // infinite loop to get incoming connections
    for(;;)
    StreamConnection stream = notify.acceptandOpen();  // return a stream connection when a connection is made
    InputStrean mystream = stream.openInputStream();
    while(mystream!=-1)
    mystream.read();
    ....cheers

  • Calendar has been non-functional for hours, with small screen saying "Moving calendars to server account..." Help?

    Calendar on Mavericks MacPro has been non-functional for hours, with small screen saying "Moving calendars to server account..." How can I restore its function?

    Sorry. I found some other advice that solved the problem ere I saw your response.
    The advice was:
    Go to Finder. Holding "Option" key, find Library in "Go" pull down menu.   In Library. Select Calendars. To desktop, drag all files with the word "cache." Then go to Preferences (still in Library) and drag to desktop "com.apple.ical.plist".  Restart. Now Calendar is working perfectly, and rechecking under Library, the caches files and the com.apple.ical.plist  that were dragged to the desktop have reappeared in Calendars and Preferences.
    All is well. Many thanks for your reply! Sorry that I did not get to check it out.

  • The MS15-10 Security Update for Windows Server 2012/R2 Essentials and the Client Restore Functionality

    The MS15-10 Security Update for Windows Server 2012/R2 Essentials and the Client Restore Functionality - The Windows Server Essentials and Small Business Server Blog - Site Home - TechNet Blogs:
    http://blogs.technet.com/b/sbs/archive/2015/03/13/the-ms15-10-security-update-for-windows-server-2012-r2-essentials-and-the-client-restore-functionality.aspx
    FYI

    Hi Susan.  I hope there's a better 'fix' coming to replace this "uninstall the updates, restore, then reinstall the updates after the restore".  This kind of workaround requires that all of us remember that there's a problem
    with KB3023562 and KB3004375 from now until the end of WS2012E.  Not sure I'll remember this 6 months from now when the problem crops up during a restore.   -:(
     Merv Porter
    =========================

  • How to filter simpleChat messages (private chat)

    So I tried to find the solution, but after several hours, I can't find how to do it.
    My use case:
    There is one host for a room. Others users in the room can only talk to the host, and the users can only see their private discussion with the host. Users can see the chat component only when the host is connected.
    The host use another application in which he can see the list of users who are talking to him. He can select a user in the list, and he see a simple chat with only the messages between him and the selected user.
    What I have completed (I think it can help others in the future, and maybe there are better way to do it):
    * In the user application: use the userManager property of your ConnectSessionContainer. It has an arrayCollection named hostCollection concerning the hosts who are currently connected.
    In my case, I put the chat components into a container, and use a binding to the visible property:
    visible="{connectSession.userManager.hostCollection.length>0}"
    You can also add an event listener to the userManager and listen for UserEvent.USER_CREATE and USER_REMOVE and check if event.userDescriptor.role==100  or checking the hostCollection.length of the userManager again.
    * If you subclass simpleClass, you can access to the _toCombo which is the combo box of the chat.
    You can set its visible property to false, and set its selectedItem to the first object in its dataprovider which role is equal to 100 in order to force the chat to be private with the host.
    * In the host application, you can create a list that use the ConnectSessionContainer.userManager.audienceCollection as dataProvider to have a list of the users.
    It's easy to set the combobox of the simple chat to speak only to the selected user, but what I haven't been able to do is to filter the history to only show the conversation with the selected user, and not other messages, without creating several rooms.
    I looked into the source code, but the history property of the simpleChatModel is just a string, and haven't find an easy way to filter it.
    I looked for an arrayCollection of the history nodes, because I could have use the filter property of the collection, but I haven't find it.
    So, where should I look, and what is the best way to filter the history using the recipient_Id?
    Thank you for your help...
    Sorry for the long post, but maybe it will help someone in the future...

    Thank you for your response Hironmay,
    I made some great progress by sub-classing both the simpleChat and simpleChatModel classes.
    I read on Nigel twitter feed that he hates private, and I can thank him for his love of protected members, because it made my job so much easier!
    I will explain what I did in the interest of other users, but I've got one last question: 
    In the Room Console AIR app, there is an "retract all items" in the node details of the explore tab. 
    I want to build the same button in my host chat application, but I haven't find a way to do it. 
    There is a retractItem method on the CollectionNode class, but it requires the itemID and I haven't find a way to access every item in the chat history in order to get their itemID. 
    I tried the clear() method of the chatModel, but it cleared only the current session, and leave the items in the server, and when the host logout, the items reappears when the host login again. 
    On the bright side, here is what I use for my applications:
    - Subsclassed the simpleChat in hostChat and clientChat classes, and the simpleChatModel in HostChatModel and ClientChatModel
    - subclass the ChatMessageDescriptor ==> PrivateChatMessageDescriptor with 2 properties: userConcernedId and fromHost (boolean)
    - override in the HostChatmodel the addMessage function to obtain  PrivateChatMessageDescriptor instances, and I add them in an ArrayCollection
    - When the host select a user in the RosterList, a filter is used on the ArrayCollection, and the HistoryTextArea is updated to show only the thread between the host and the user. The _toCombo is updated to send private message to this user.
    - I override the updateTypingIfNeeded method of HostChat to use a SharedProperty which contains the userId of the selected user when the host is typing or an empty string. This way, in the clientChat, I only show for the user when the host is typing a message for him, and not when other users are typing.
    - I replace the TextInput by a TextArea to enable multiline input (well, this one opened lots of problems to fix, but I have)
    - A lots of other tweaks  
    So as you can see, I made it
    But I look forward to a new set of sparks component, because it would have been much easier to extend the SimpleChat without rewritten half of it. 
    And here are some of my feature requests: 
    - In the SimpleChat class, add a protected getAndInitModel() , which would be called in the subscribe method. This way, one can switch the model without overriding the subscribe method of the Chat class.
    - Have a "multilineInput" property in the SimpleChat class to chose a TextInput or a TextArea as the user input component.
    - Provide a way to enable Host/Users interaction directly in the pods without having to create a new room for each user to "separate" them.
    I think a lot of use cases for LCCS would be to implement solutions for Customer Experience, and that will need more focus on what the host can do (private chat, ...) 
    Thank you again for your help, and thank the entire teams for this incredible service. 
    Dimitri K.

  • Lync Edge functional for external client but federation is not working

    Hi,
    I am working on Lync Edge Server from couple of weeks but unfortunately, I can't federate with Skype and other partners. First of all I want to mention following things:
    1. Lync 2013 Front-End Server is fully functional for Internal Users
    2. Lync 2013 Reverse Proxy is fully functional for Mobile Users
    3. Lync 2013 Edge Server is fully functional for External Users except Federation.
    Let me share Edge Server current configuration with you.
    1. Lync Edge Pool have two NICs, Internal (Private IP) and External (3 Public IPs with default gateway and External DNS)
    2. Host File have entries for Lync front-end server
    3. Local CA certificate for Internal Interface and Starfield CA Certificate for External interface with required SAN e.g., acs.domain.com etc
    4. Skype is searching my domain URIs but added contact is showing offline in skype
    5. Lync 2013 Basic client is showing Presence Unknown for Skype contacts (Skype contacts already merged with Live ID)
    6. Test-CSFederatedPartner cmdlet is also giving 504 error while testing from Front-end server.
    This is production environment actually so please let me know if I am missing something.

    Verify that you configure SRV Record on External DNS {SRV Record _sipfederationtls._tcp.<domain> on port 5061 and SRV Record _sip._tls.<domain> on port 443}
    Also Verify that you enable lync federation on Lync topology and publish it
    On a Front End server, open Topology Builder. Expand Edge pools, then right click your Edge server or Edge server pool. Select Edit properties.
    In Edit Properties under General, select Enable federation for this Edge pool (Port 5061). Click OK.
    Click Action, select Topology, select Publish. When prompted on Publish the topology, click Next. When the Publish is finished, click Finish.
    On the Edge server, open the Lync Server Deployment wizard. Click Install or Update Lync Server System, then click Setup or Remove Lync Server Components. Click Run Again.
    At Setup Lync Server components, click Next. The summary screen will show actions as they are executed. Once the deployment is done, click View Log to view available log files. Click Finish to complete the deployment.
    For configuration of lync federation, you can check blow link
    http://technet.microsoft.com/en-us/library/jj204800.aspx
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"

  • How to create a dynamic multi-line function in SQL Server

    I am attempting to create a Multi-Line Function in SQL Server that accepts a dynamic WHERE clause as a parameter. I need this so that the function can be as versatile as possible for the filter that needs to be applied. I am unfortunately getting an error
    upon creation of the function.  I don't know how to solve the problem. Can someone advise me?
    SQL:
    SET
    ANSI_NULLSON
    GO
    SET
    QUOTED_IDENTIFIERON
    GO
    -- =============================================
    -- Author:
    -- Create date: 2/3/2014
    -- Description: This multiline function will accept a generic WHERE Clause and apply it to the query for return.
    -- =============================================
    CREATE
    FUNCTIONTESTMULTILINEFUNCTION
    @WHEREvarchar(1024)
    ,@CHANGEDDATEasdatetime
    RETURNS
    @TESTTABLE
    TABLE
    IDint
    ,REVint
    AS
    BEGIN
    Declare@SQLSTRINGvarchar(4096)
    SET@SQLSTRING=''
    SET@SQLSTRING=@SQLSTRING+'SELECT
    REVS.ID, REVS.Revision
    FROM
    Select distinct result.ID, Max(Rev) as ''''Revision''''
    FROM
    Select * from dbo.BugsAll
    where
    [Changed Date] < @CHANGEDDATE
    ) result
    GROUP BY result.ID
    ) REVS
    join dbo.BugsAll BA on (BA.ID=REVS.ID AND BA.REV=REVS.revision)'
    IF
    (@WHEREisnotnullOR@WHERE<>'')
    BEGIN
    SET@SQLSTRING=@SQLSTRING+'
    WHERE '+@WHERE;
    END
    INSERT@TESTTABLE
    EXEC
    (@SQLSTRING)
    RETURN
    END
    GO
    ERROR:
    Msg 443, Level 16, State 14, Procedure TESTMULTILINEFUNCTION, Line 44
    Invalid use of a side-effecting operator 'INSERT EXEC' within a function.
    Senior Test Lead -- Microsoft

    >> Unfortunately I really need to form a dynamic query in a table valued function on the SQL SERVER. I have another tabled valued function that needs something returned as a table in order to further join the data. I am not allowed to use Stored
    Procedures in that function. <<
    You do know that real SQL programmers hate the proprietary nightmare of tabled valued functions?  This is how you procedural programmers avoid learning set-oriented declarative and functional programming. 
    Your mindset wants to write to a scratch tape or disk file (aka “tabled valued function result table”) just like you did BASIC, FORTRAN or COBOL. QL programmers do not have to materialize their data. We can use VIEW or a drive table as well as a base table. 
    >> Plus, there are occasions where I don't want to pass in a field [sic: columns are not fields] parameter or need to change a parameter list such that I don't wish the table function to filter by a particular field [sic] or other setting. <<
    What you want is a magical “Automobiles, Squids and Lady Gaga” function. An SQL programmer might write a complex VIEW then do simpler SELECTs off it. 
    >> My application pushes the WHERE clause from EXCEL to SQL to do the hard work as EXCEL is not the application in which I want to process the SQL statement and pass it via ODBC. I cannot run macros in Excel on the web.<< 
    This is a crazy language system. Usually we fetch data in SQL and then pass it to a math package, report writer, etc. We never keep logic (aka WHERE clauses) outside the database. 
    >> I am bummed about the fact that this feature doesn't work. It will up my server management costs to maintain unique tabular based functions based on WHERE clause query <<
    So stop writing those “tabular based functions”, change your mindset and start learning SQL and do it right. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Where in migration process does old server stop functioning as primary server?

    I am migrating from a SBS 2003 box to a new WS 2012 R2 Essentials box - following the instructions from 
    "Migrate from Previous Versions to Windows Server 2012 R2 Essentials or Windows Server Essentials Experience".   What I need to know is where in the process does
    the old server stop functioning as a server for my network.   What I mean by this is when in the migration process (when I add the new server as a replicate DC?  not until I demote the old server?) will any programs/databases on the old server no
    longer be available to client computers?  
    Thanks for any insight.

    Yeah, we need to agree on what is meant by "the server". In Windows, Server means many different things. Each time you move, a role or feature from the "old" to the "new" the old server ceases to function as "the server"
    for that role or feature. The basic functions of a Windows DC include Active Directory, 5 FSMO roles, file and print services, and application services to name just a few.
    So the answer to your question is more to do with what you mean by "server".  In particular, for the application role, you must move the app to the new server by whatever means the developer recommends.  At that point, regardless of whatever
    else is going on the old server is out of the picture for that application.
    Larry Struckmeyer[MVP] If your question is answered please mark the response as the answer so that others can benefit.

Maybe you are looking for

  • Greater than function not sourcing bool?

    HI, I have the following. Whenever I try to connect the 'Greater than' output to the AND function I keep getting a connection error "Dynamic type not Bool" well something like that. If this is the case how come I was allowed to connect the 'Less than

  • Logic Pro X not seeing any loops    Garage band does!!

    Need help in directing Logic Pro to see and list loops...tried re indexing...uninstall and reinstall program....updates....about at the end for Logic pro...but I hate to give up!....any Help? Thanks Forrest S

  • To map Visa expense type to SAP Transaction key, what needs to be mapped??

    I'm requesting a list of expense types from Visa, to map with SAP expense types. What do they have to provide me? is it merchant code?

  • IMac screen blacks out when lowering brightness?

    iMac 27" mid-2010 If I lower brightness, after a short while screen cuts out - computer works fine in background. When I am on highest brightness - everything is fine... Does anyone know what is happening here?

  • ATA187 Second Line Problem

    Hi, I have a customer with the following problem: The second port of their ATA187s are constantly trying to register and establishes UDP connections with the site firewall. Eventually this exceeds the max connections on the F/W and results in a major