Package com.benkyou.common.messages

Examples of com.benkyou.common.messages.WebcamMessage


        this.gameServer = gameServer;
    }

    public void messageReceived(HostedConnection source, Message message) {
        if (message instanceof WebcamMessage) {
            WebcamMessage name = (WebcamMessage) message;
        }
    }
View Full Code Here


                        if (bufferedImageBytes.length >= ByteArrayList.MESSAGE_LIMIT) {
                            imageBytes = bal.divideArrayList(ByteArrayList.MESSAGE_LIMIT, bufferedImageBytes);
                            int numberOfParts = imageBytes.size();
                            int imageCount = 0;
                            for (byte[] b : imageBytes) {
                                gameServer.getMyServer().broadcast(new WebcamMessage(b, numberOfParts, imageCount, imageID).setReliable(false));
                                ++imageCount;
                            }
                        } else {
                            int numberOfParts = -1;
                            int imageCount = -1;
                            gameServer.getMyServer().broadcast(new WebcamMessage(bufferedImageBytes, numberOfParts, imageCount, imageID).setReliable(false));
                        }

                    } catch (IOException ex) {
                        Logger.getLogger(WebcamServer.class.getName()).log(Level.SEVERE, null, ex);
                    }
View Full Code Here

     * @param source
     * @param m
     */
    public void messageReceived(Client source, Message m) {
        if (m instanceof WebcamMessage) {
            WebcamMessage webcamMessage = (WebcamMessage) m;
            if (gameClient.isUp()) {
                if (webcamMessage.getNumberOfParts() > 0) {
                    processImages(webcamMessage);
                } else {
                    processSingleImage(webcamMessage);
                }
            }
View Full Code Here

TOP

Related Classes of com.benkyou.common.messages.WebcamMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.