gAmUssA

gAmUssA

69p

25 comments posted · 1 followers · following 2

11 years ago @ ...all we are is dust ... - WebSockets for Java De... · 2 replies · +1 points

Artem, 
As you mentioned earlier, new Websocket(ws://host); is async. With async model event would be fired by framework and you as developer just define handlers. In vanilla JavaScript, you should not rely on ready state for your case and manually check connection state. 
According to spec, when connection is established open event will be fired. You can define handle onopen handler.

websocket.onopen = function (event) {
                console.log('open');
            };

Java code from your example is gwt, isn't it?

Thanks

--
With Best Regards,
Vik Gamov

<p style="color:#a0a0a8">

11 years ago @ ...all we are is dust ... - WebSockets for Java De... · 0 replies · +1 points

Hi Artem,

The simplest way is to put your websocket object to global scope. For obvious reasons, this approach is not very good. What you're looking for is to incapsulate websocket instance as singleton. e.g. you can read here how to do that here
http://addyosmani.com/resources/essentialjsdesignpatterns/book/#singletonpatternjavascript

Thanks
--
With Best Regards,
Vik Gamov

<p style="color: #A0A0A8;">

11 years ago @ ...all we are is dust ... - Мобильное и ... · 0 replies · +1 points

Пост очень древний. Сейчас (по крайней мере пару месяцев назад) там стало гараздо удобней по iOS разрабатывать. Контролы разные приятные iOSные появились. в принципе, это way to go, если не хочется возиться с xcode и проч http://help.adobe.com/en_US/flex/mobileapps/WS064...

12 years ago @ Mac OS World .RU - Полное руко... · 0 replies · +1 points

I love the efforts you could have put in place this, regards for all the great articles .

13 years ago @ ...all we are is dust ... - Поскорее бы ... · 0 replies · +1 points

Уверен, что в вашем родлике, что в моем - это всего лишь концепт и ничего больше. Следующая винда не будет координально отличаться от ближайшего своего предшественника - windows 7. иначе будет тяжело склонять пользователей к переходу на новую версию

13 years ago @ Радио-Т - Темы для 219 · 0 replies · +26 points

Австрийская компания ThriXXX (http://www.thrixxx.com/) выпустила первое демо реального применения Microsoft Kinect для интерфейса секс-игр. http://habrahabr.ru/blogs/ui/110306/

13 years ago @ Радио-Т - Темы для 218 · 0 replies · +3 points

Maven оказался популярнее, чем Ant. Eclipse популярнее IDEA. И еще много статистики касаемо JEE http://clck.ru/3XP5

13 years ago @ Радио-Т - Темы для 217 · 0 replies · +3 points

Статья и слайды о том, как быть со всякими фреймворками http://www.richardlord.net/presentations/so-many-...

13 years ago @ Радио-Т - Темы для 192 · 0 replies · -6 points

Опубликованы результаты опроса разработчиков, использующих Eclipse http://ianskerrett.wordpress.com/2010/06/07/trend...

14 years ago @ Русский блог - Portable IE6 · 0 replies · +1 points

Спасибо за ссылку. Очень полезно!