next[{p_,rtt_}][{t_,_,_,x_}]:=With[{tt=(rtt^2)((Sqrt[((#)^2)+2((Random[GeometricDistribution[p]]+1)/(rtt^2))])-#)&/@x},
With[{ti=First@First@Position[tt,Min[tt]],xx=x+((Min[tt])/(rtt^2))},
With[{xxx=Table[If[i==ti,xx[[i]]/2,xx[[i]]],{i,Length@x}]},
{t+Min[tt],Mean[xx],Mean[xxx],xxx}]]]

simtcp[pp_,T_,x0_:{0}]:=NestWhileList[next[pp],{0,Mean[x0],Mean[x0],x0},First[#]<T&]

sawtooth[{{t0_,_,x0_},{t1_,x1_,x2_}}]:={{t0,x0},{t1,x1},{t1,x2}}

simtcpline[{p_,rtt_},T_,n_]:=With[{x=simtcp[{p,rtt},T,Table[((Sqrt[2])/(rtt(Sqrt[p]))),{n}]]},
Line[Join@@(sawtooth/@Partition[Take[#,3]&/@x,2,1])]
]

Drift[{p_,rtt_}][x_]:=(1/(rtt^2))-p ((x^2)/2);

pp={.02,.1};

Manipulate[
VectorPlot[{0,Drift[{p,rtt}][x]},{t,0,8},{x,0,2((Sqrt[2])/(rtt(Sqrt[p])))},VectorStyle->GrayLevel[.7],VectorScale->.005,Epilog->simtcpline[{p,rtt},8,n],AspectRatio->1/GoldenRatio],
{{p,.02},.005,.1,.005,Appearance->"Labeled"},
{{rtt,.1},.01,.3,.01,Appearance->"Labeled"},
{{n,1},1,20,1,Appearance->"Labeled"},
TrackedSymbols:>{p,rtt,n},
ContinuousAction->False
]