From cd818dfad1c3b6ac2c5244a3ed27957512b24124 Mon Sep 17 00:00:00 2001 From: Abbas Aliakbari Date: Thu, 16 Aug 2018 19:11:11 +0430 Subject: [PATCH] change to fix some bugs Fix bugs in close socket client when client close its socket. --- build/built-jar.properties | 2 +- build/classes/.netbeans_automatic_build | 0 build/classes/.netbeans_update_resources | 0 build/classes/javaside/JavaSide$1.class | Bin 1523 -> 1620 bytes build/classes/javaside/JavaSide$2.class | Bin 2279 -> 2349 bytes build/classes/javaside/JavaSide.class | Bin 1525 -> 1525 bytes .../classes/javaside/Socket/TcpClient$1.class | Bin 1556 -> 1603 bytes build/classes/javaside/Socket/TcpClient.class | Bin 4114 -> 4105 bytes .../Socket/TcpClientEventHandler.class | Bin 224 -> 269 bytes .../classes/javaside/Socket/TcpServer$1.class | Bin 1633 -> 1624 bytes build/classes/javaside/Socket/TcpServer.class | Bin 2745 -> 2736 bytes .../Socket/TcpServerEventHandler.class | Bin 228 -> 303 bytes .../org/shokai/evmsg/TcpClient$1.class | Bin 0 -> 1623 bytes .../org/shokai/evmsg/TcpServer$1$1.class | Bin 0 -> 1186 bytes .../org/shokai/evmsg/TcpServer$1.class | Bin 0 -> 1374 bytes .../org/shokai/evmsg/TcpServer$2.class | Bin 0 -> 1108 bytes dist/JavaSide.jar | Bin 19057 -> 19113 bytes src/javaside/Socket/TcpClient.java | 11 ++++++++++- 18 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 build/classes/.netbeans_automatic_build create mode 100644 build/classes/.netbeans_update_resources create mode 100644 build/classes/org/shokai/evmsg/TcpClient$1.class create mode 100644 build/classes/org/shokai/evmsg/TcpServer$1$1.class create mode 100644 build/classes/org/shokai/evmsg/TcpServer$1.class create mode 100644 build/classes/org/shokai/evmsg/TcpServer$2.class diff --git a/build/built-jar.properties b/build/built-jar.properties index 13680d0..a39dd46 100644 --- a/build/built-jar.properties +++ b/build/built-jar.properties @@ -1,4 +1,4 @@ -#Fri, 10 Aug 2018 22:26:22 +0430 +#Thu, 16 Aug 2018 16:40:48 +0430 D\:\\Projects\\Temp\\SocketInVBAndJava\\JavaSide= diff --git a/build/classes/.netbeans_automatic_build b/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/build/classes/.netbeans_update_resources b/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/build/classes/javaside/JavaSide$1.class b/build/classes/javaside/JavaSide$1.class index 76b04de4b991745d66a823e972d332fc9e2574a6..ed843af4233d46246da94086e446dabf982a3d2c 100644 GIT binary patch delta 348 zcmZ9HxlRIM6otQk9GzkO8w8CZ7RC)%#sxQ26n6yy#SIJ1s1t%ALoy(Vl@BpbV(cvJ zY^;3}?Tv$#@fP>LUV%6l0fNK~IxquFGNmzXpknIGG#PKMS)I8i z=M5HE)JYgDv23tHvZ+>e)-+NY>lzzR#ehikSKU&~vFq2i<b-koXY7VuNjXln zZq>_GrzQwz?yQDoRxGDv<{Gx^mTztEN@Tk?C0lGu!gNZy*wNUP?6L2?iM~jhj3mv0 zKuPvWvg9=Kl0%L>p+rIj$uTDyr;;CX>Go;UXZ delta 253 zcmW-c$udJh7)DRGo9e#p-xw>EvQUUAB1DYgnukabvuwNoFW@=)0X&1UQ_5DAwKuU> zx_yi9obCCRpYG1r@7o7Z<1VF#8AmVWlvyfMdwuQYq8JMY5D27@f+EJzSaM*FenLzuI_648%!(#lhV6*49%dQTa+Hr&Ol(*o|>V}SVuj;y9=!9L*4Fszj zb57(`dXC$!Od7x6ZRxT2gLqfEqPWU6#TwQs)-j~G&W*U58l1kVm}VvsZz&v_0wlAF z7Fu#!(WWEmD(1K&=_&5w3JNvP3xm*i<|lO6@mj$^7O%j(fqMmfML?)nAd0`F>MIrZ z8In9uJmk^mT>6_xKjulioY`PK6>QuR{}k)vy!C#?Gew`5iVEA}MQc>Nj(=G{#G802 z`%$D~E&mkRYL1viP=|v8(MWdArCh?qCyfDk2 OG+Y_aDbk##!NflwzhV6V delta 435 zcmW-dxl>b76vlry%e&!nW_V-_(L$MFV8+G;luc1F!38v+D8Y>-nrKusm^^}l5>T13 zuyO7mprwt4V`pJu$)7++MNebrc%P>@-!kVb&i5_3+uGRr`|}rYlFcSk^cmXdk2@or zVyFf*gH4>`w83L2TxSxTHJoGEaGs1I%ZT9u7n3e>HDo!>xMsp|jq8RGgGHYgLY0~juw?fl zSznVE>U3z9g_pegk%|6R(G^y0E|xZVeC7qXY2niaz TW!=4d$tiJ}%S0Jvj4S^DkMvCs diff --git a/build/classes/javaside/JavaSide.class b/build/classes/javaside/JavaSide.class index 7d95468daa97c77a3480fc5bdbfc87c0b8bbc08e..a1b7ad5ada19995521728f22502502241e1842bf 100644 GIT binary patch delta 17 Vcmey${gr#e8&*yR1|bG8001=#1HAwM delta 17 Wcmey${gr#e8&*yZ1|bFz-~a$MS_91h diff --git a/build/classes/javaside/Socket/TcpClient$1.class b/build/classes/javaside/Socket/TcpClient$1.class index beeb80981fc9119da66f0e233d3ce66026c2d4af..8b32057b72ffbe2060b3f23c8fb18e330ee69fb5 100644 GIT binary patch delta 525 zcmYL`O;1xn6o#LBsZ6*GA5sWZ3mS-FVF+9Pf~Kt4 z6SfkK0ZG`9NWy>N4;X^J_nOE|=Dg22XTHwNo;|mP%bTBPzyu%aXd)4qA&+K;J)V#Z zOe%0k0vh!gV?3aVdY&>FP}=a!FlBgdm^QpPDpVXNQ$2IWax<3uytG7VvD^(zD_xdX z%v!SKEU%ffykXw3V0nvgc}L#x-m=J&r9f9T>2_8Z-BN4wW_hQa`dHqoq>9_0Hnu7b zu`i!v-!9y!8%^V?!)E+D&M}dF)~Z*Lp55-mFQWfqb%_%^mqR@H?hon@|D5Lks zvT9xtuPRegW?j5No{sPz?r4*Ky6M4D&d7TpS`O);qo>P0)(n>c2Bi^wTbz3$PrEcp)&2tYH&2rQ delta 479 zcmYL`$ua~%5Qe{QLxon>AsG9^g{)LxD*}r)kg#I!WmMiZYTc z%4WqmmdLYw!LEc)S|w*V7N4lgrf|ZgN^GQ^4jiQ!sV-4Iq;AncNIfF8MT{2tUhP`S iNMsFtTZVq^0Z(-e>cC})Vfl!D!YIum&r^0#tky3JTS3+U diff --git a/build/classes/javaside/Socket/TcpClient.class b/build/classes/javaside/Socket/TcpClient.class index 6047d5fd6dd4ce7f1ef958a9e878498127437494..8aab408f26fb03c58694438f6e6b08bb52499647 100644 GIT binary patch delta 877 zcmaKrNlz3}6otQ{X{)KOrb&<()K1fY8jXq~;uI5uAP!L%g3UbIAX7D9Gov8LsDe@| z&La-!%COUfgsofufJ+k-e}EzCeZ5fP!b>VAjrZrn&BNPYv$dmCn>d4>Xb+t2?VR ztWYH5aM-d!wUNB;+E8nxA#CY9G(m`OVD0&rn(=SJRxZERL0+( zdjrpSuAvzwFPJlV$t#oB1a;n+%=1=Ow3i&o3stM;V&hKI%PA%~ZF}4YHzh5Tpp*0q zDc5B$1lBCGTJQ(jGQKEBq21;l*nCEe7qXs8`~*p%h#eG@Nh!N1V-MxzQ^7H+>|`@D z?Z3*hoU&q>H77zisl%jR4&gj&X&^u&8)+gNi+!}PpD?*{YfPzv1LSc;Vu8Fa9N9V2 zE0QUq*k0#p3A9U>5z^>j3w?5-y4X&)blF3WIM1cup7#U-CDOYV)kq*Vu6CvCs8*@{ z&C?nf6s;lYWmt43q+*1fjIx_C>0w;lPTKwPfk2t4|JADdN2{C)dog~4b4q+p+h61T zj!M~~C2ykb^ZMP@%1eTa8fv3l$qMcqp(r=If~%umxJ-Yvju_c71RKO7@^{EVOO)p~ DB!#7% delta 824 zcmaKqNl#Qk6otPB-MsGCue(89hzLy!XdELrYup$FB}R=hXv;ha%8ZI2(4c^Vf=W3n zg7a)*h#O6eTXpHerHP3lv}rhOa>V4QMH1~67RM~ybm)^#ljEB1vhdTbnI4m{MLfMGeI8D5 z(xl%Ke!yhVB7sv@p5SSHG-NWY#b@;SSuGmS#sYo~Nm?^vkw%M#Q5Wa*|Gcibpkd5H zanao=ywnn+7Wn|Ysl^FfTFhc6HBgcD%t2Vh@({Noaai+R%a8qx_Re^K9aZ7bL zlVc`qCJCu==bV^*gbWf@Pjo_DT86H>ZF7f^&0Q(@=3JM2kNXCOW%GcCHjj90^MsJe zQ=4ZzpV}Dn&f(6YlPwIBtsI_B3-hOmHOc>l=u8SU6izc+@CU{;NfC~{s@4-;lq>!1mtY8}DlDdv{?}RBNf=daSELu=q!^nLx#UvjQbv$+ z7Er+&s##AJ8>ms=?POOWBHK@qn&oW>*2yr3NTr^|w930^WI0VTOf#ElA&WLO=?w;p zWkf>;gIFBy%D=-!yh_wpZ*#C+ygH<1r}*@WqKgc=Sxt{zR9HgwsWx9QSSs#+ylVdO zDx+Mz@})ZmB+j7v;tNDqP^k=mrl*Q*Y44ISHL{Oa?_F_f!ta~m4^SK7NBw~ru8xBd Y?xQ~ti0FxuvC<=Z#$rv`v3p{ diff --git a/build/classes/javaside/Socket/TcpClientEventHandler.class b/build/classes/javaside/Socket/TcpClientEventHandler.class index 032b5e80b6d0958373a016cce608957d41cda01d..fccc0b1a7d8ff322b1b0beed48e71971a7eee7c1 100644 GIT binary patch delta 99 zcmaFB*vlkv>ff$?3=9k=41DYiJnRg-69v?irSpr@_3~0nl2Q}%iuD2#ixP8FOHzyc tfK)Lf14~Y3Ug|`XiOP%&tU#Si3~Vfn4D1XX3=BY;6GSsGGH`)qxB)876fOV& delta 55 zcmeBWdcY`f>ff$?3=9k=3_R=%TJM)ylIurM;PGO#g#Xm$|Iz{tP>B$*gE E0ZN$%w*UYD diff --git a/build/classes/javaside/Socket/TcpServer$1.class b/build/classes/javaside/Socket/TcpServer$1.class index 872b32ff4e6241a1c160bfaaa996db6925a02dbc..38eaed0586619962c80ea1bd321d7b657985cdfa 100644 GIT binary patch delta 274 zcmXAkH&O#Z5Jlf;x2lU#D`1776d)2|h1*4V;k`$ANR;Y6djd{CKt{j;H~}fwAONO| z4!-IBLH{rP)XvAx+dI(YsfUCKPnm{ij7ee2c-k|=tS2Tln|bDF8qAwrD6+_su!O*;KX|QY!Q-1E#jw$zNP8+htGKR}MI|%aL--iEyf%ajsl& zskFHgu9X{Z9fNrqSIhOZo?8A+x#vNt@%Y*(d`GR={USICZ36U0L=1<51x6SR9EY#R P=?f|eyCkqp>7V`prBWY| delta 265 zcmW-cM@|Gm3`Jjck1$hXgaiVn7l4GwLmZl%nw)b^>O<89;0)|oZ~#ugmTRy8+HBtU zlPydCQ@=F-_<4H=Ql84RFzRV#%u{1rn6RAm)S2>>NKL0bGt3(1Oy?^suqZ5fnpn20 z6~n5K32VaoOYX|Wr+>*p?&{SIWs`2DjdrEOrY*J|NvOFbRd(1F_LO}NY<;L4aV(rD zr<^J0Tqu`Z3D?REw~o&693`PSYOLHT_dFOL9YB2eMV=9;QajT=E!6^v-mW}Jl06iJ&~s)CSmL`c1Pi-9|vdo9;# z*vyjb#`=DYKtzC(H*r8PO;Qb8IZuiiRkbqyG^4I6v|GJe&sNVg$Gocea-Ib;s^d%e yvy4H&Vv!|x4k;ny|JpJuJuNNcBCAGZOg+kYyqCaW)%~o&8bfZE?wO$5-TDJLs5^52 delta 380 zcmXw#$w~uJ5Jk`H#JuiKM>F6E5)gDJNN}Y|j7Ehx#Caa#9AmWA=-!WbAE6sj$x0V~ zfQTD^#+CS9z*?N5?!84pJ-5EL-hKSOy#s^XICL;)FmJG6uxPO45@9*a3abWdl64n{ z4VO+fU0T?ZY@5ucWXH_Al9FW4CCH|&RR&+=}tSA`ByAa4SqDpo?oTE>xqOtX8-`kDQ7*b}EB&8 z0jXj}2F~Q1%+$P+_{ diff --git a/build/classes/org/shokai/evmsg/TcpClient$1.class b/build/classes/org/shokai/evmsg/TcpClient$1.class new file mode 100644 index 0000000000000000000000000000000000000000..7ce53d5922d10a8f9347868971ad59057809ea68 GIT binary patch literal 1623 zcma)6+foxj5Iqwv3+oC21Qiu;5ksOb5yT64ArTY|H-na?R$1$2NLJQeYO_%OfInfC zzUr%`;^o0dAN(b&)H53pC?T4v^qlVLp6))=v)_My`3hhVcbXALT8UFS+HhJ&AI>OY zDz#ssjE=Jy(CK_msYAPP9v3uRRLUg{!x~03T-IT1-v`rjUhmY^c zm0l?7!DVQtu%?q5cIPRZ+w9PiU+{Z52)V^fw$$ucG-C zx~o?G8{%sy{TaJrc>U{Zo`%>ecEA4hZUesAfG^*&dL3E5I3rqT(Gsl>SX>=c16eWw zWM~~=--Bf49MTw~eUwobF^)@onxmM-2T~8B16g{)8EQJ*cwy0PTv0^`jZTavc7$0mPHYxG|;eETEw2R9u*)9EFCJ@C3 ze}F&Ac&4pTQ`}8MfQ<0pV^yh~vc&-IX>LJBWZn8Dfn87>$L<#U0|Zy@uGayge_pzm6Bo2ccMr}0?UmcY}-*M_~LlB?43nz z``A4{l3`DV`RXox-+RjIeh^qK#6#=F6Mj^T+r0RHG8V~kT~bd&)o-{)nFh&J6kGWL6mY=FiPK$_{t>% z8IBVK0_(_fT;Lj^v=3?ZOjGhgvA>Upga@S4sBGyH;u6X4xW}1MzQ#lXx3pA7kj)U4 z5$fy>bry?w(x=X0X-HkBhZZAlX$I;x`xMq-b4bCHcH{Vw!L(!MUrpCAjWJ2vEX&Ra eUuMXcz*909EbTMeB>y$5%pWYI!TI2s9GE}RW&Vi( literal 0 HcmV?d00001 diff --git a/build/classes/org/shokai/evmsg/TcpServer$1.class b/build/classes/org/shokai/evmsg/TcpServer$1.class new file mode 100644 index 0000000000000000000000000000000000000000..8e929d25a9e6b88b08710ba12ed0501d37f8a784 GIT binary patch literal 1374 zcma)6T~pIg5IuoPFhr=Js8}Up)wU?5X#Jpkh@}czbjBi%zJ>G-1k$9Fq#g0WAL1YI znHdB}XVhnZlzMJkKu1KI>CNu#+1<0-bMLqBA3p=Qfk#KtgDV=MNNBi(q>7Y$4{NxJ zYZ@XLk#1VUC^B*xQ*pf$H#Br1tKz1LTPkiV=m=NsAU>)fR`mRpbg=5Jn|4~%E5S;7 z(W;h&Ul)FkxCz^}!zl%WiNk=&B?XbZR~8C-inc2r*DA}xUo@8;?(`Nt%XF4Z-OeJ|5_p19=U|f@#NeSJF>wZ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#NoTQK%+JUiaV2DD@jYl3O#FP-L51Zu^ogGj|3c$0ymAv( zXl$|`$&!bWB6&Ba(c)u{g&Y+ym)c6CaWGk^p??b_>d?SFL>xvVB3LkjP72*3S(BwkGkW)W#(cfhNfzmSGA#)&{hva=QYSlm%W#Pfm=g>g7J;0&x}6^mIx7b;lo zJS=5v%h=R%-o*;Uuu8lvyfdd4HuOQq8s1+&6Rc&$1IWWV4qyYDU(e}V*(9NE;<5kt{X*6$&H^0)w#GCAHqYkV{s5N@Aee2#jg z o>B=e7$Cy{Dzf)aXKc%jUd!#xR_gl)sQr#T!FvkpgPsB|B3k*Z$y#N3J diff --git a/src/javaside/Socket/TcpClient.java b/src/javaside/Socket/TcpClient.java index 52f1028..af95630 100644 --- a/src/javaside/Socket/TcpClient.java +++ b/src/javaside/Socket/TcpClient.java @@ -51,7 +51,16 @@ public void run(){ Thread.sleep(readInterval); String line = bReader.readLine(); - if(handler != null) handler.onMessage(line); + if(handler != null) + { if(line!=null) + { + handler.onMessage(line); + } + else + { + that.close(); + } + } } catch(SocketException ex){