Find Jobs
Hire Freelancers

Write some java code

$10-30 USD

已关闭
已发布超过 6 年前

$10-30 USD

货到付款
I need you to develop some software for me. I would like this software to be developed using Java. I need some one to this on java SR sender Sliding Window – Selective-Repeat 1. Get Input: if any there is any input from the users (chars or words) add to a list or queue private static ArrayBlockingQueue<Packet> queue; // Blocking version is thread save if there is not more input then once we have send off all the packets (and got acks) we are done so set a flag or something similar 2. Send Packets if input Queue has packets to send AND Sliding Window has slots send packets while (![login to view URL]()) AND (lastSent - snd_base < WINDOW_SIZE) do get a packet from input Queue (p = [login to view URL](); ) make datagram from p (Packet has method for this) send datagram ([login to view URL](datagram);) set timer and thread for resending (Packet has method for this) note the sequence number of the packet, we are going to have to wait for an acknowledgement add sseq_num to the Set Set_of_UnaAcked_Packets (Packet has method for this) Note the Set is a SortedSet<Integer> // ordered/sorted set 3. Receive Acknowledgements if Sliding Window has slots used slots (snd_base <= lastSent) try to get all possible acks make packet and datagram receive datagram ([login to view URL](datagram);) make packet from datagram (Packet has method) get sequence number from packet (rseq_num = [login to view URL]();) if sequence number too big then ignore packet (continue) if less than Window base (snd_base) then ignore packet (continue) if sequence number in-between snd_base and snd_base + WINDOW_SIZE then check if sequence number is in Set_of_UnaAcked_Packets if it is an unAcknowledged Packet then unschedule Thread resend task & timer (Packet) and see if we can move Windows base identify contiguous sequence of acknowledged packets and update Window base snd_base = largest sequence_number of contiguous acknowledged packets . starting with snd_base for example, if we received ack for 6 and had Set with {6 7 8 11 13} note set is a ordered set (sorted) then we would set snd_base to 8 and remove from 6, 7, and 8 from the Set if packet is ack for LAST (we sent our LAST packet and this is an ack for it) and Set is and queue are empty we are DONE SR receiver 1. Receive packet get packet sequence_number if sequence number is less that rcv_base then we have already received (and acknowledged) this packet but the sender has sent it again (lost ack?) so send an ACK packet again if sequence number is greater than rcv_base+WINDOW_SIXE -1 then it is outside windows, we just ignore it (continue) if sequence number is in between rcv_base and rcv_base+WINDOW_SIXE -1 then receiver’s window and we need to send a selective ACK packet If the packet was not previously received, it is buffered. (added to a small list) If this packet has a sequence number equal to the base of the receive window, then this packet, and any previously . buffered and consecutively numbered (beginning with rcv_base) packets are printed out (in order) And then receive window base (rcv_bas) is then moved forward by the number of packets printed For example if we have rcv_base=2 and received i packets 2, 3, 4, 6,8 can printout 2, 3, and 4 And set rcv_base to 5
项目 ID: 15869169

关于此项目

4提案
远程项目
活跃6 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
4威客以平均价$34 USD来参与此工作竞价
用户头像
Hi I am a professional software engineer I have +3 years experience in this field I have lots of expertise in Java and software development I will provide quality work according to your requirements we can discuss more about project over chat regards
$20 USD 在1天之内
3.9 (14条评论)
3.7
3.7
用户头像
hello I will be glad by working in this task I have many previous applications in Java development i have many previous applications related to this task requirements i can show some of them throw teamviewer app thank you Mohamed
$10 USD 在1天之内
0.0 (0条评论)
0.0
0.0
用户头像
We have experts on JAVA application development we working on Spring, Hibernate and Struts framework
$25 USD 在1天之内
0.0 (0条评论)
0.0
0.0

关于客户

UNITED STATES的国旗
United States
0.0
0
会员自12月 13, 2017起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。